summary refs log tree commit diff
path: root/pkgs/os-specific/linux/klibc
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-04-18 17:05:40 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-04-19 14:45:36 +0200
commit002f5e24b48d047e67a79470b777bd10fa64a6c7 (patch)
treeb19a641142401fef48323221c2ad9b83d578eaf0 /pkgs/os-specific/linux/klibc
parent893186f4fd4c1e697b2bc38aa8f268f236d5ea02 (diff)
downloadnixpkgs-002f5e24b48d047e67a79470b777bd10fa64a6c7.tar
nixpkgs-002f5e24b48d047e67a79470b777bd10fa64a6c7.tar.gz
nixpkgs-002f5e24b48d047e67a79470b777bd10fa64a6c7.tar.bz2
nixpkgs-002f5e24b48d047e67a79470b777bd10fa64a6c7.tar.lz
nixpkgs-002f5e24b48d047e67a79470b777bd10fa64a6c7.tar.xz
nixpkgs-002f5e24b48d047e67a79470b777bd10fa64a6c7.tar.zst
nixpkgs-002f5e24b48d047e67a79470b777bd10fa64a6c7.zip
linuxPackages.klibc: use linuxHeaders
klibc was the only user of kernelHeaders; it should use the Linux API
headers, however.
Diffstat (limited to 'pkgs/os-specific/linux/klibc')
-rw-r--r--pkgs/os-specific/linux/klibc/default.nix15
1 files changed, 7 insertions, 8 deletions
diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix
index b948dbff2c1..a4c7f644be1 100644
--- a/pkgs/os-specific/linux/klibc/default.nix
+++ b/pkgs/os-specific/linux/klibc/default.nix
@@ -1,16 +1,15 @@
-{ stdenv, fetchurl, kernelHeaders, kernel, perl }:
+{ stdenv, fetchurl, linuxHeaders, perl }:
 
 let
-  version = "2.0.4";
-
   commonMakeFlags = [
     "prefix=$(out)"
     "SHLIBDIR=$(out)/lib"
   ];
 in
 
-stdenv.mkDerivation {
-  name = "klibc-${version}-${kernel.version}";
+stdenv.mkDerivation rec {
+  name = "klibc-${version}";
+  version = "2.0.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/libs/klibc/2.0/klibc-${version}.tar.xz";
@@ -23,13 +22,13 @@ stdenv.mkDerivation {
 
   makeFlags = commonMakeFlags ++ [
     "KLIBCARCH=${stdenv.platform.kernelArch}"
-    "KLIBCKERNELSRC=${kernelHeaders}"
+    "KLIBCKERNELSRC=${linuxHeaders}"
   ] ++ stdenv.lib.optional (stdenv.platform.kernelArch == "arm") "CONFIG_AEABI=y";
 
   crossAttrs = {
     makeFlags = commonMakeFlags ++ [
       "KLIBCARCH=${stdenv.cross.platform.kernelArch}"
-      "KLIBCKERNELSRC=${kernelHeaders.crossDrv}"
+      "KLIBCKERNELSRC=${linuxHeaders.crossDrv}"
       "CROSS_COMPILE=${stdenv.cross.config}-"
     ] ++ stdenv.lib.optional (stdenv.cross.platform.kernelArch == "arm") "CONFIG_AEABI=y";
   };
@@ -41,7 +40,7 @@ stdenv.mkDerivation {
     cp $(find $(find . -name static) -type f ! -name "*.g" -a ! -name ".*") $dir/
     cp usr/dash/sh $dir/
 
-    for file in ${kernelHeaders}/include/*; do
+    for file in ${linuxHeaders}/include/*; do
       ln -sv $file $out/lib/klibc/include
     done
   '';