summary refs log tree commit diff
path: root/pkgs/os-specific/linux/mdadm/default.nix
diff options
context:
space:
mode:
authorhsloan <ishaqsloan@gmail.com>2017-06-28 16:39:12 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-28 21:24:24 -0400
commit5d83d36389f5dbd84913e8f582e126bedd278fbe (patch)
tree7b7ba110a908a003c5c1bd59d1ac710f99d9a207 /pkgs/os-specific/linux/mdadm/default.nix
parenta210b08d188404c13498ff075b9a3b28d063642d (diff)
downloadnixpkgs-5d83d36389f5dbd84913e8f582e126bedd278fbe.tar
nixpkgs-5d83d36389f5dbd84913e8f582e126bedd278fbe.tar.gz
nixpkgs-5d83d36389f5dbd84913e8f582e126bedd278fbe.tar.bz2
nixpkgs-5d83d36389f5dbd84913e8f582e126bedd278fbe.tar.lz
nixpkgs-5d83d36389f5dbd84913e8f582e126bedd278fbe.tar.xz
nixpkgs-5d83d36389f5dbd84913e8f582e126bedd278fbe.tar.zst
nixpkgs-5d83d36389f5dbd84913e8f582e126bedd278fbe.zip
mdadm: Don't use stdenv.cross
Diffstat (limited to 'pkgs/os-specific/linux/mdadm/default.nix')
-rw-r--r--pkgs/os-specific/linux/mdadm/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/mdadm/default.nix b/pkgs/os-specific/linux/mdadm/default.nix
index e0109791ef2..589099c911c 100644
--- a/pkgs/os-specific/linux/mdadm/default.nix
+++ b/pkgs/os-specific/linux/mdadm/default.nix
@@ -1,4 +1,7 @@
-{ stdenv, fetchurl, groff }:
+{ stdenv
+, fetchurl, groff
+, buildPlatform, hostPlatform
+}:
 
 assert stdenv.isLinux;
 
@@ -19,8 +22,8 @@ stdenv.mkDerivation rec {
   makeFlags = [
     "NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin"
     "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm"
-  ] ++ stdenv.lib.optionals (stdenv ? cross) [
-    "CROSS_COMPILE=${stdenv.cross.config}-"
+  ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [
+    "CROSS_COMPILE=${stdenv.cc.prefix}"
   ];
 
   nativeBuildInputs = [ groff ];