diff options
-rw-r--r-- | pkgs/misc/my-env/default.nix | 2 | ||||
-rw-r--r-- | pkgs/misc/my_env/default.nix | 58 |
2 files changed, 1 insertions, 59 deletions
diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix index d876991ce6ac9..647e5dcab3c28 100644 --- a/pkgs/misc/my-env/default.nix +++ b/pkgs/misc/my-env/default.nix @@ -45,7 +45,7 @@ mkDerivation { name = "env-${name}"; phases = "buildPhase"; setupNew = substituteAll { - src = ../../stdenv/generic/setup-new.sh; + src = ../../stdenv/generic/setup.sh; preHook=""; postHook=""; initialPath= (import ../../stdenv/common-path.nix) { inherit pkgs; }; diff --git a/pkgs/misc/my_env/default.nix b/pkgs/misc/my_env/default.nix deleted file mode 100644 index 9853041832d87..0000000000000 --- a/pkgs/misc/my_env/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -# idea: provide nix environment for your developement actions -# experimental - -/* - # example: - # add postgresql to environment and create ctags (tagfiles can be extracted from TAG_FILES) - # add this to your ~/.nixpkgs/config.nix - - devEnvs = pkgs : with pkgs; with sourceAndTags; - let simple = { name, buildInputs ? [], cTags ? [] }: - pkgs.myEnvFun { - inherit name stdenv; - buildInputs = buildInputs - ++ map (x : sourceWithTagsDerivation ( (addCTaggingInfo x ).passthru.sourceWithTags ) ) cTags; - extraCmds = ". ~/.bashrc; cd $PWD - # configure should find them - export LDFLAGS=$NIX_LDFLAGS - export CFLAGS=$NIX_CFLAGS_COMPILE - "; - preBuild = "export TAG_FILES"; - }; - in { - postgresql = simple { - name = "postgresql"; - buildInputs = [postgresql]; - cTags = [postgresql ]; - }; - }; - - Put this into your .bashrc - loadEnv(){ . "${HOME}/.nix-profile/dev-envs/${1}" } - then install and - $ loadEnv postgresql - -*/ - -args: args.stdenv.mkDerivation ( - { extraCmds =""; } // { - phases = "buildPhase"; - buildPhase = '' - eval "$preBuild" - name=${args.name} - o=$out/dev-envs/$name - ensureDir `dirname $o` - echo " - OLDPATH=\$PATH " >> $o - export | grep -v HOME= | grep -v PATH= | grep -v PWD= | grep -v TEMP= | grep -v TMP= >> $o - echo " - PATH=$PATH:$OLDPATH - for i in \$buildInputs; do - export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$i/lib - done - export PATH=\$PATH:\$OLDPATH - $extraCmds - echo env $name loaded - " >> $o - ''; -} // args // { name = "${args.name}-env"; } ) |