summary refs log tree commit diff
path: root/pkgs/misc/cups
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2021-08-11 16:39:59 +0200
committerFelix Buehler <account@buehler.rocks>2021-08-12 00:13:02 +0200
commitd2c9385b6bb0fd21c12f57f6581f2150fd3ccc88 (patch)
tree9f589a16247fbe5ebe0f605496072c379392cef2 /pkgs/misc/cups
parentcf73f351382ccb7279695474bc00e6ca0813e030 (diff)
downloadnixpkgs-d2c9385b6bb0fd21c12f57f6581f2150fd3ccc88.tar
nixpkgs-d2c9385b6bb0fd21c12f57f6581f2150fd3ccc88.tar.gz
nixpkgs-d2c9385b6bb0fd21c12f57f6581f2150fd3ccc88.tar.bz2
nixpkgs-d2c9385b6bb0fd21c12f57f6581f2150fd3ccc88.tar.lz
nixpkgs-d2c9385b6bb0fd21c12f57f6581f2150fd3ccc88.tar.xz
nixpkgs-d2c9385b6bb0fd21c12f57f6581f2150fd3ccc88.tar.zst
nixpkgs-d2c9385b6bb0fd21c12f57f6581f2150fd3ccc88.zip
canon-cups-ufr2: deprecate phases
Diffstat (limited to 'pkgs/misc/cups')
-rw-r--r--pkgs/misc/cups/drivers/canon/default.nix31
1 files changed, 22 insertions, 9 deletions
diff --git a/pkgs/misc/cups/drivers/canon/default.nix b/pkgs/misc/cups/drivers/canon/default.nix
index 0d6ec276b5f..57efae68af3 100644
--- a/pkgs/misc/cups/drivers/canon/default.nix
+++ b/pkgs/misc/cups/drivers/canon/default.nix
@@ -1,16 +1,27 @@
-{ lib, stdenv, fetchurl, unzip, autoreconfHook, libtool, makeWrapper, cups
-, ghostscript, pkgsi686Linux, zlib }:
+{ lib
+, stdenv
+, fetchurl
+, unzip
+, autoconf
+, automake
+, libtool
+, makeWrapper
+, cups
+, ghostscript
+, pkgsi686Linux
+, zlib
+}:
 
 let
 
-  i686_NIX_GCC = pkgsi686Linux.callPackage ({gcc}: gcc) {};
-  i686_libxml2 = pkgsi686Linux.callPackage ({libxml2}: libxml2) {};
+  i686_NIX_GCC = pkgsi686Linux.callPackage ({ gcc }: gcc) { };
+  i686_libxml2 = pkgsi686Linux.callPackage ({ libxml2 }: libxml2) { };
 
   commonVer = "4.10";
   version = "3.70";
   dl = "8/0100007658/08";
 
-  versionNoDots = builtins.replaceStrings ["."] [""] version;
+  versionNoDots = builtins.replaceStrings [ "." ] [ "" ] version;
   src_canon = fetchurl {
     url = "http://gdlp01.c-wss.com/gds/${dl}/linux-UFRII-drv-v${versionNoDots}-uken-05.tar.gz";
     sha256 = "0424lvyrsvsb94qga4p4ldis7f714c5yw5ydv3f84mdl2a7papg0";
@@ -24,18 +35,18 @@ stdenv.mkDerivation {
   inherit version;
   src = src_canon;
 
-  phases = [ "unpackPhase" "installPhase" ];
-
   postUnpack = ''
     (cd $sourceRoot; tar -xzf Sources/cndrvcups-common-${commonVer}-1.tar.gz)
     (cd $sourceRoot; tar -xzf Sources/cndrvcups-lb-${version}-1.tar.gz)
   '';
 
-  nativeBuildInputs = [ makeWrapper unzip autoreconfHook libtool ];
+  nativeBuildInputs = [ makeWrapper unzip autoconf automake libtool ];
 
   buildInputs = [ cups zlib ];
 
   installPhase = ''
+    runHook preInstall
+
     ##
     ## cndrvcups-common buildPhase
     ##
@@ -213,7 +224,9 @@ stdenv.mkDerivation {
     makeWrapper "${ghostscript}/bin/gs" "$out/bin/gs" \
       --prefix LD_LIBRARY_PATH ":" "$out/lib" \
       --prefix PATH ":" "$out/bin"
-    '';
+
+    runHook postInstall
+  '';
 
   meta = with lib; {
     description = "CUPS Linux drivers for Canon printers";