about summary refs log tree commit diff
path: root/pkgs/misc/drivers
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-02-03 16:54:03 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-02-03 16:57:19 +0100
commitae74c356d94b795eb07dfe9978788b49b70f5959 (patch)
treec13c6894b75f95d3a4dc4627efef508bb03dfba8 /pkgs/misc/drivers
parentc9790126312119ce5a2a8ac946d9f086e7ea9f55 (diff)
parent53e0f8b1cdf36574bfede6e62e2ac2739c3ef804 (diff)
downloadnixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.gz
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.bz2
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.lz
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.xz
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.zst
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.zip
Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
Diffstat (limited to 'pkgs/misc/drivers')
-rw-r--r--pkgs/misc/drivers/gutenprint/default.nix91
-rw-r--r--pkgs/misc/drivers/hplip/3.15.9.nix6
-rw-r--r--pkgs/misc/drivers/hplip/default.nix4
3 files changed, 30 insertions, 71 deletions
diff --git a/pkgs/misc/drivers/gutenprint/default.nix b/pkgs/misc/drivers/gutenprint/default.nix
index 98776c0c42b0..5be7f5ecff4d 100644
--- a/pkgs/misc/drivers/gutenprint/default.nix
+++ b/pkgs/misc/drivers/gutenprint/default.nix
@@ -1,78 +1,41 @@
 # this package was called gimp-print in the past
-{ fetchurl, stdenv, pkgconfig, composableDerivation, cups
-, libtiff, libpng, makeWrapper, openssl, gimp }:
+{ stdenv, lib, fetchurl, pkgconfig
+, ijs, makeWrapper
+, gimp2Support ? true, gimp
+, cupsSupport ? true, cups, libusb, perl
+}:
 
-let
-   version = "5.2.10";
-   inherit (composableDerivation) edf wwf;
-in
-
-composableDerivation.composableDerivation {} {
-  name = "gutenprint-${version}";
+stdenv.mkDerivation rec {
+  name = "gutenprint-5.2.11";
 
   src = fetchurl {
-    url = "mirror://sourceforge/gimp-print/gutenprint-${version}.tar.bz2";
-    sha256 = "0n8f6vpadnagrp6yib3mca1c3lgwl4vmma16s44riyrd84mka7s3";
+    url = "mirror://sourceforge/gimp-print/${name}.tar.bz2";
+    sha256 = "1yadw96rgp1z0jv1wxrz6cds36nb693w3xlv596xw9r5w394r8y1";
   };
 
-  # gimp, gui is still not working (TODO)
-  buildInputs = [ makeWrapper openssl pkgconfig ];
+  nativeBuildInputs = [ makeWrapper pkgconfig ];
+  buildInputs =
+    [ ijs ]
+    ++ lib.optionals gimp2Support [ gimp.gtk gimp ]
+    ++ lib.optionals cupsSupport [ cups libusb perl ];
+
+  configureFlags = lib.optionals cupsSupport [
+    "--disable-static-genppd" # should be harmless on NixOS
+  ];
 
-  configureFlags = ["--enable-static-genppd"];
-  NIX_CFLAGS_COMPILE="-include stdio.h";
-  
-  #preConfigure = ''
-  #  configureFlags="--with-cups=$out/usr-cups $configureFlags"
-  #'';
-  
-  /*
-     is this recommended? without it this warning is printed:
+  enableParallelBuilding = true;
 
-            ***WARNING: Use of --disable-static-genppd or --disable-static
-                        when building CUPS is very dangerous.  The build may
-                        fail when building the PPD files, or may *SILENTLY*
-                        build incorrect PPD files or cause other problems.
-                        Please review the README and release notes carefully!
-  */
+  # Testing is very, very long.
+  # doCheck = true;
 
-  installPhase = ''
-    eval "make install $installArgs"
-    mkdir -p $out/lib/cups
-    ln -s $out/filter $out/lib/cups/
-    wrapProgram $out/filter/rastertogutenprint.5.2 --prefix LD_LIBRARY_PATH : $out/lib
-    wrapProgram $out/sbin/cups-genppd.5.2 --prefix LD_LIBRARY_PATH : $out/lib
-  '';
+  installFlags =
+    lib.optionals cupsSupport [ "cups_conf_datadir=$(out)/share/cups" "cups_conf_serverbin=$(out)/lib/cups" "cups_conf_serverroot=$(out)/etc/cups" ]
+    ++ lib.optionals gimp2Support [ "gimp2_plug_indir=$(out)/${gimp.name}-plugins" ];
 
-  meta = { 
+  meta = with stdenv.lib; {
     description = "Ghostscript and cups printer drivers";
     homepage = http://sourceforge.net/projects/gimp-print/;
-    license = "GPL";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
   };
-
-  mergeAttrBy = { installArgs = stdenv.lib.concat; };
-
-  # most interpreters aren't tested yet.. (see python for example how to do it)
-  flags =
-      wwf {
-        name = "gimp2";
-        enable = {
-          buildInputs = [gimp gimp.gtk];
-          installArgs = [ "gimp2_plug_indir=$out/${gimp.name}-plugins" ];
-        };
-      }
-      // {
-        cups = {
-          set = {
-           buildInputs = [cups libtiff libpng ];
-           installArgs = [ "cups_conf_datadir=$out cups_conf_serverbin=$out cups_conf_serverroot=$out"];
-          };
-        };
-      }
-    ;
-
-  cfg = {
-    gimp2Support = true;
-    cupsSupport = true;
-  };
-
 }
diff --git a/pkgs/misc/drivers/hplip/3.15.9.nix b/pkgs/misc/drivers/hplip/3.15.9.nix
index 722615be46e7..9cd5a7894646 100644
--- a/pkgs/misc/drivers/hplip/3.15.9.nix
+++ b/pkgs/misc/drivers/hplip/3.15.9.nix
@@ -8,9 +8,8 @@
 
 let
 
-  version = "3.15.9";
-
   name = "hplip-${version}";
+  version = "3.15.9";
 
   src = fetchurl {
     url = "mirror://sourceforge/hplip/${name}.tar.gz";
@@ -48,7 +47,7 @@ assert withPlugin -> builtins.elem hplipArch pluginArches
   || throw "HPLIP plugin not supported on ${stdenv.system}";
 
 stdenv.mkDerivation {
-  inherit name src;
+  inherit name src version;
 
   buildInputs = [
     libjpeg
@@ -179,7 +178,6 @@ stdenv.mkDerivation {
   '';
 
   meta = with stdenv.lib; {
-    inherit version;
     description = "Print, scan and fax HP drivers for Linux";
     homepage = http://hplipopensource.com/;
     license = if withPlugin
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix
index 071ffe8c1001..ebe8a4d19abf 100644
--- a/pkgs/misc/drivers/hplip/default.nix
+++ b/pkgs/misc/drivers/hplip/default.nix
@@ -8,9 +8,8 @@
 
 let
 
-  version = "3.15.11";
-
   name = "hplip-${version}";
+  version = "3.15.11";
 
   src = fetchurl {
     url = "mirror://sourceforge/hplip/${name}.tar.gz";
@@ -179,7 +178,6 @@ stdenv.mkDerivation {
   '';
 
   meta = with stdenv.lib; {
-    inherit version;
     description = "Print, scan and fax HP drivers for Linux";
     homepage = http://hplipopensource.com/;
     license = if withPlugin