diff --git a/pkgs/misc/sane-backends/snapshot.nix b/pkgs/applications/graphics/sane/backends-git.nix similarity index 62% rename from pkgs/misc/sane-backends/snapshot.nix rename to pkgs/applications/graphics/sane/backends-git.nix index 8b74db5df44d..2455923bbb80 100644 --- a/pkgs/misc/sane-backends/snapshot.nix +++ b/pkgs/applications/graphics/sane/backends-git.nix @@ -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; + }; } diff --git a/pkgs/misc/sane-backends/default.nix b/pkgs/applications/graphics/sane/backends.nix similarity index 74% rename from pkgs/misc/sane-backends/default.nix rename to pkgs/applications/graphics/sane/backends.nix index ac6fed5deb46..0fcfca747410 100644 --- a/pkgs/misc/sane-backends/default.nix +++ b/pkgs/applications/graphics/sane/backends.nix @@ -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; + }; } diff --git a/pkgs/applications/graphics/sane/frontends.nix b/pkgs/applications/graphics/sane/frontends.nix new file mode 100644 index 000000000000..1c768e29873e --- /dev/null +++ b/pkgs/applications/graphics/sane/frontends.nix @@ -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; + }; +} diff --git a/pkgs/misc/xsane/default.nix b/pkgs/applications/graphics/sane/xsane.nix similarity index 68% rename from pkgs/misc/xsane/default.nix rename to pkgs/applications/graphics/sane/xsane.nix index 8dd99c3c74d0..c4fdf3a00440 100644 --- a/pkgs/misc/xsane/default.nix +++ b/pkgs/applications/graphics/sane/xsane.nix @@ -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; }; } diff --git a/pkgs/misc/sane-front/default.nix b/pkgs/misc/sane-front/default.nix deleted file mode 100644 index 9427d17ac648..000000000000 --- a/pkgs/misc/sane-front/default.nix +++ /dev/null @@ -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 []); -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9e55ef2a8eb..9294800f684a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };