1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

SANE: switch snapshot version of the backends to git (and general cleanup)

This commit is contained in:
Peter Simons 2012-11-26 16:17:31 +01:00
parent fc57b8940b
commit a814d0bc90
6 changed files with 68 additions and 40 deletions

View file

@ -5,11 +5,12 @@ in
assert hotplugSupport -> (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux");
stdenv.mkDerivation {
name = "sane-backends-1.0.22.git20121123";
name = "sane-backends-1.0.22.482-g071f226";
src = fetchurl {
url = "http://www.sane-project.org/snapshots/sane-backends-git20121123.tar.gz";
sha256 = "d13a8c9e85af52f7be2e45c70cb93a76ec04b76e7fc983809e7d70389b6e7ae5";
src = fetchgit {
url = "http://git.debian.org/git/sane/sane-backends.git";
rev = "071f2269cd68d3411cbfa05a3d028b74496db970";
sha256 = "178xkv30m6irk4k0gqnfcl5kramm1qyj24dar8gp32428z1444xf";
};
udevSupport = hotplugSupport;
@ -29,4 +30,13 @@ stdenv.mkDerivation {
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
" \${out}/share/sane/gt68xx/" + firmware.name
else "";
meta = {
homepage = "http://www.sane-project.org/";
description = "Scanner Access Now Easy";
license = "GPLv2+";
maintainers = [ stdenv.lib.maintainers.simons ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,20 +1,19 @@
{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null
, pkgconfig ? null
, gt68xxFirmware ? null }:
let
firmware = gt68xxFirmware {inherit fetchurl;};
in
{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null, pkgconfig ? null , gt68xxFirmware ? null }:
assert hotplugSupport -> (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux");
let
firmware = gt68xxFirmware { inherit fetchurl; };
in
stdenv.mkDerivation rec {
version = "1.0.23";
name = "sane-backends-${version}";
src = fetchurl {
url = "https://launchpad.net/ubuntu/+archive/primary/+files/sane-backends_${version}.orig.tar.gz";
sha256 = "4d4f5b2881615af7fc0ed75fdde7dc623a749e80e40f3f792fe4010163cbb029";
};
udevSupport = hotplugSupport;
buildInputs = []
@ -32,8 +31,17 @@ stdenv.mkDerivation rec {
'';
preInstall =
if gt68xxFirmware != null then
if gt68xxFirmware != null then
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
" \${out}/share/sane/gt68xx/" + firmware.name
else "";
meta = {
homepage = "http://www.sane-project.org/";
description = "Scanner Access Now Easy";
license = "GPLv2+";
maintainers = [ stdenv.lib.maintainers.simons ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -0,0 +1,26 @@
{ stdenv, fetchurl, saneBackends, libX11, gtk, pkgconfig, libusb ? null}:
stdenv.mkDerivation rec {
name = "sane-frontends-1.0.14";
src = fetchurl {
url = "ftp://ftp.sane-project.org/pub/sane/sane-frontends-1.0.14/${name}.tar.gz";
md5 = "c63bf7b0bb5f530cf3c08715db721cd3";
};
preConfigure = ''
sed -e '/SANE_CAP_ALWAYS_SETTABLE/d' -i src/gtkglue.c
'';
buildInputs = [saneBackends libX11 gtk pkgconfig] ++
(if (libusb != null) then [libusb] else []);
meta = {
homepage = "http://www.sane-project.org/";
description = "Scanner Access Now Easy";
license = "GPLv2+";
maintainers = [ stdenv.lib.maintainers.simons ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,10 +1,10 @@
{stdenv, fetchurl, saneBackends, saneFrontends,
libX11, gtk, pkgconfig, libpng, libusb ? null}:
stdenv.mkDerivation {
{ stdenv, fetchurl, saneBackends, saneFrontends, libX11, gtk, pkgconfig, libpng, libusb ? null }:
stdenv.mkDerivation rec {
name = "xsane-0.998";
src = fetchurl {
url = http://www.xsane.org/download/xsane-0.998.tar.gz;
url = "http://www.xsane.org/download/${name}.tar.gz";
sha256 = "0vn2cj85ijgp2v2j2h9xpqmg2jwlbxmwyb88kxhjjakqay02ybm3";
};
@ -19,7 +19,7 @@ stdenv.mkDerivation {
homepage = http://www.sane-project.org/;
description = "Graphical scanning frontend for sane";
license = "GPLv2+";
maintainers = with stdenv.lib.maintainers; [viric];
maintainers = with stdenv.lib.maintainers; [viric simons];
platforms = with stdenv.lib.platforms; linux;
};
}

View file

@ -1,17 +0,0 @@
{stdenv, fetchurl, saneBackends, libX11, gtk,
pkgconfig, libusb ? null}:
stdenv.mkDerivation {
name = "sane-frontend";
src = fetchurl {
url = ftp://ftp.sane-project.org/pub/sane/sane-frontends-1.0.14/sane-frontends-1.0.14.tar.gz;
md5 = "c63bf7b0bb5f530cf3c08715db721cd3";
};
preConfigure = ''
sed -e '/SANE_CAP_ALWAYS_SETTABLE/d' -i src/gtkglue.c
'';
buildInputs = [saneBackends libX11 gtk pkgconfig] ++
(if (libusb != null) then [libusb] else []);
}

View file

@ -8950,16 +8950,17 @@ let
xlockmore = callPackage ../misc/screensavers/xlockmore { };
saneBackends = callPackage ../misc/sane-backends {
saneBackends = callPackage ../applications/graphics/sane/backends.nix {
gt68xxFirmware = config.sane.gt68xxFirmware or null;
hotplugSupport = config.sane.hotplugSupport or true;
};
saneBackendsSnapshot = callPackage ../misc/sane-backends/snapshot.nix {
saneBackendsGit = callPackage ../applications/graphics/sane/backends-git.nix {
gt68xxFirmware = config.sane.gt68xxFirmware or null;
hotplugSupport = config.sane.hotplugSupport or true;
};
saneFrontends = callPackage ../misc/sane-front { };
saneFrontends = callPackage ../applications/graphics/sane/frontends.nix { };
slock = callPackage ../misc/screensavers/slock { };
@ -9058,9 +9059,9 @@ let
xosd = callPackage ../misc/xosd { };
xsane = callPackage ../misc/xsane {
xsane = callPackage ../applications/graphics/sane/xsane.nix {
libpng = libpng12;
saneBackends = saneBackendsSnapshot;
saneBackends = saneBackends;
};
yafc = callPackage ../applications/networking/yafc { };