about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/elfutils/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-23 17:58:48 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-07-24 19:40:46 -0400
commit4116754f4583b2f7502c05aa52d4fe09eafad253 (patch)
tree8c9a5aee0dba2bac27fc7fa65ef80e17c33a9bac /pkgs/development/tools/misc/elfutils/default.nix
parent46b03cd5b2ed13cd9534192cefa1396ca861a835 (diff)
elfutils: Don't use crossAttrs
Diffstat (limited to 'pkgs/development/tools/misc/elfutils/default.nix')
-rw-r--r--pkgs/development/tools/misc/elfutils/default.nix70
1 files changed, 32 insertions, 38 deletions
diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix
index 2ee573e4ba18b..af140bfb1d65b 100644
--- a/pkgs/development/tools/misc/elfutils/default.nix
+++ b/pkgs/development/tools/misc/elfutils/default.nix
@@ -28,46 +28,40 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  crossAttrs = {
+  # This program does not cross-build fine. So I only cross-build some parts
+  # I need for the linux perf tool.
+  # On the awful cross-building:
+  # http://comments.gmane.org/gmane.comp.sysutils.elfutils.devel/2005
+  #
+  # I wrote this testing for the nanonote.
 
-    /* Having bzip2 will harm, because anything using elfutils
-       as buildInput cross-building, will not be able to run 'bzip2' */
-    propagatedBuildInputs = [ zlib.crossDrv ];
+  buildPhase = if stdenv.hostPlatform == stdenv.buildPlatform then null else ''
+    pushd libebl
+    make
+    popd
+    pushd libelf
+    make
+    popd
+    pushd libdwfl
+    make
+    popd
+    pushd libdw
+    make
+    popd
+  '';
 
-    # This program does not cross-build fine. So I only cross-build some parts
-    # I need for the linux perf tool.
-    # On the awful cross-building:
-    # http://comments.gmane.org/gmane.comp.sysutils.elfutils.devel/2005
-    #
-    # I wrote this testing for the nanonote.
-    buildPhase = ''
-      pushd libebl
-      make
-      popd
-      pushd libelf
-      make
-      popd
-      pushd libdwfl
-      make
-      popd
-      pushd libdw
-      make
-      popd
-    '';
-
-    installPhase = ''
-      pushd libelf
-      make install
-      popd
-      pushd libdwfl
-      make install
-      popd
-      pushd libdw
-      make install
-      popd
-      cp version.h $out/include
-    '';
-  };
+  installPhase = if stdenv.hostPlatform == stdenv.buildPlatform then null else ''
+    pushd libelf
+    make install
+    popd
+    pushd libdwfl
+    make install
+    popd
+    pushd libdw
+    make install
+    popd
+    cp version.h $out/include
+  '';
 
   meta = {
     homepage = https://sourceware.org/elfutils/;