summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-05-25 17:53:37 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-05-25 17:53:37 +0000
commit6934b46182014fc80da7d9d7f985c530fb8b3b7d (patch)
tree6bc3813e1acb87aa20aea09efae63fc8ae626c98 /pkgs
parentd40123a24708b3e93ca49257434afeb390cec8be (diff)
downloadnixpkgs-6934b46182014fc80da7d9d7f985c530fb8b3b7d.tar
nixpkgs-6934b46182014fc80da7d9d7f985c530fb8b3b7d.tar.gz
nixpkgs-6934b46182014fc80da7d9d7f985c530fb8b3b7d.tar.bz2
nixpkgs-6934b46182014fc80da7d9d7f985c530fb8b3b7d.tar.lz
nixpkgs-6934b46182014fc80da7d9d7f985c530fb8b3b7d.tar.xz
nixpkgs-6934b46182014fc80da7d9d7f985c530fb8b3b7d.tar.zst
nixpkgs-6934b46182014fc80da7d9d7f985c530fb8b3b7d.zip
Making a trick on myEnv so I can put the cross gcc and some 'propagatedBuildInputs',
to have myEnv with cross-builders and cross-built libs.

(I'm trying by now to mingw64 + librsync.hostDrv)


svn path=/nixpkgs/trunk/; revision=34249
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/misc/my-env/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix
index dc729ec557a..990606668fe 100644
--- a/pkgs/misc/my-env/default.nix
+++ b/pkgs/misc/my-env/default.nix
@@ -56,17 +56,24 @@
   and show you a shell with a prefixed prompt.
 */
 
-{ mkDerivation, substituteAll, pkgs } : { stdenv ? pkgs.stdenv, name, buildInputs ? [], cTags ? [], extraCmds ? "", shell ? "${pkgs.bashInteractive}/bin/bash"} :
+{ mkDerivation, substituteAll, pkgs }:
+    { stdenv ? pkgs.stdenv, name, buildInputs ? []
+    , propagatedBuildInputs ? [], gcc ? stdenv.gcc, cTags ? [], extraCmds ? ""
+    , shell ? "${pkgs.bashInteractive}/bin/bash"}:
+
 mkDerivation {
   # The setup.sh script from stdenv will expect the native build inputs in
   # the buildNativeInputs environment variable.
-  buildNativeInputs = [ ] ++ buildInputs ;
+  buildNativeInputs = [ ] ++ buildInputs;
+  # Trick to bypass the stdenv usual change of propagatedBuildInputs => propagatedNativeBuildInputs
+  propagatedBuildInputs2 = propagatedBuildInputs;
+
   name = "env-${name}";
   phases = [ "buildPhase" "fixupPhase" ];
   setupNew = substituteAll {
     src = ../../stdenv/generic/setup.sh;
     initialPath= (import ../../stdenv/common-path.nix) { inherit pkgs; };
-    gcc = stdenv.gcc;
+    inherit gcc;
   };
 
   buildPhase = ''
@@ -81,6 +88,7 @@ mkDerivation {
         -i "$s"
     cat >> "$out/dev-envs/''${name/env-/}" << EOF
       buildNativeInputs="$buildNativeInputs"
+      propagatedBuildInputs="$propagatedBuildInputs2"
       # the setup-new script wants to write some data to a temp file.. so just let it do that and tidy up afterwards
       tmp="\$("${pkgs.coreutils}/bin/mktemp" -d)"
       NIX_BUILD_TOP="\$tmp"