summary refs log tree commit diff
path: root/pkgs/stdenv/generic-branch/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2004-07-02 10:05:53 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2004-07-02 10:05:53 +0000
commit5a00ba432ca2f90848930b242603a0cbb1e699a5 (patch)
tree3a7a6fcaab1f1765ee1b0299308b5e794b93b8e4 /pkgs/stdenv/generic-branch/default.nix
parentec6eb9c473c5c56654ad47f3949c9fe0ed465d79 (diff)
downloadnixpkgs-5a00ba432ca2f90848930b242603a0cbb1e699a5.tar
nixpkgs-5a00ba432ca2f90848930b242603a0cbb1e699a5.tar.gz
nixpkgs-5a00ba432ca2f90848930b242603a0cbb1e699a5.tar.bz2
nixpkgs-5a00ba432ca2f90848930b242603a0cbb1e699a5.tar.lz
nixpkgs-5a00ba432ca2f90848930b242603a0cbb1e699a5.tar.xz
nixpkgs-5a00ba432ca2f90848930b242603a0cbb1e699a5.tar.zst
nixpkgs-5a00ba432ca2f90848930b242603a0cbb1e699a5.zip
* Don't strip debug info on Darwin, otherwise links by libtool fail
  ("/usr/bin/ld: can't use -s with -r (resulting file would not be
  relocatable)").
* Since stdenv/generic had to be modified for this, I forked it in
  situ.  This should be merged later.

svn path=/nixpkgs/trunk/; revision=1121
Diffstat (limited to 'pkgs/stdenv/generic-branch/default.nix')
-rw-r--r--pkgs/stdenv/generic-branch/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic-branch/default.nix b/pkgs/stdenv/generic-branch/default.nix
new file mode 100644
index 00000000000..3aa2d3bfac0
--- /dev/null
+++ b/pkgs/stdenv/generic-branch/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, name, preHook ? null, postHook ? null, initialPath, gcc, shell
+, param1 ? "", param2 ? "", param3 ? "", param4 ? "", param5 ? ""
+}:
+
+let {
+
+  body =
+
+    stdenv.mkDerivation {
+      inherit name;
+
+      builder = ./builder.sh;
+
+      setup = ./setup.sh;
+
+      inherit preHook postHook initialPath gcc shell;
+
+      # TODO: make this more elegant.
+      inherit param1 param2 param3 param4 param5;
+    }
+
+    # Add a utility function to produce derivations that use this
+    # stdenv and its shell.
+    // {
+      mkDerivation = attrs: derivation (attrs // {
+        builder = shell;
+        args = ["-e" (if attrs ? builder then attrs.builder else ./default-builder.sh)];
+        stdenv = body;
+        system = body.system;
+      });
+    };
+
+}