summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kbd
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-24 13:10:53 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-24 22:33:39 -0400
commit99413d3e3c25b57b96353ac7edb5863b9812fcf7 (patch)
tree34a6c21006f701c19a26ca2525fa61296d7194f1 /pkgs/os-specific/linux/kbd
parent912440dae8952f36b17f993f2770fc8e3d2a84e4 (diff)
downloadnixpkgs-99413d3e3c25b57b96353ac7edb5863b9812fcf7.tar
nixpkgs-99413d3e3c25b57b96353ac7edb5863b9812fcf7.tar.gz
nixpkgs-99413d3e3c25b57b96353ac7edb5863b9812fcf7.tar.bz2
nixpkgs-99413d3e3c25b57b96353ac7edb5863b9812fcf7.tar.lz
nixpkgs-99413d3e3c25b57b96353ac7edb5863b9812fcf7.tar.xz
nixpkgs-99413d3e3c25b57b96353ac7edb5863b9812fcf7.tar.zst
nixpkgs-99413d3e3c25b57b96353ac7edb5863b9812fcf7.zip
kbd: Hard-code the path to gzip/bzip2
This is necessary for systemd-vconsole-setup.service in systemd.
Diffstat (limited to 'pkgs/os-specific/linux/kbd')
-rw-r--r--pkgs/os-specific/linux/kbd/default.nix22
1 files changed, 14 insertions, 8 deletions
diff --git a/pkgs/os-specific/linux/kbd/default.nix b/pkgs/os-specific/linux/kbd/default.nix
index da45b39cee1..c9ca75b563d 100644
--- a/pkgs/os-specific/linux/kbd/default.nix
+++ b/pkgs/os-specific/linux/kbd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, bison, flex, autoconf, automake }:
+{ stdenv, fetchurl, bison, flex, autoconf, automake, gzip, bzip2 }:
 
 stdenv.mkDerivation rec {
   name = "kbd-1.15.2";
@@ -10,13 +10,19 @@ stdenv.mkDerivation rec {
 
   buildNativeInputs = [ bison flex autoconf automake ];
 
-  # We get a warning in armv5tel-linux and the fuloong2f,
-  # so we disable -Werror in it
-  patchPhase = if (stdenv.isArm ||
-    stdenv.system == "mips64el-linux")
-    then ''
-      sed -i s/-Werror// src/Makefile.am
-    '' else "";
+  patchPhase =
+    ''
+      # Fix the path to gzip/bzip2.
+      substituteInPlace src/findfile.c \
+        --replace gzip ${gzip}/bin/gzip \
+        --replace bzip2 ${bzip2}/bin/bzip2 \
+    
+      # We get a warning in armv5tel-linux and the fuloong2f, so we
+      # disable -Werror in it.
+      ${stdenv.lib.optionalString (stdenv.isArm || stdenv.system == "mips64el-linux") ''
+        sed -i s/-Werror// src/Makefile.am
+      ''}
+    '';
 
   # Grrr, kbd 1.15.1 doesn't include a configure script.
   preConfigure = "autoreconf";