aboutsummaryrefslogtreecommitdiff
path: root/stdenv.nix
diff options
context:
space:
mode:
Diffstat (limited to 'stdenv.nix')
-rw-r--r--stdenv.nix42
1 files changed, 0 insertions, 42 deletions
diff --git a/stdenv.nix b/stdenv.nix
deleted file mode 100644
index 607ed76..0000000
--- a/stdenv.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{ bash
-, writeTextFile
-, ...
-}:
-
-rec {
-
- mkDerivations = x: derivations (spread (removeAttrs x [ "variations" ]) x.variations);
-
- spread = x: ys: map (y: x // y) ys;
-
- addDefaults =
- let
- opt = x: a: if builtins.hasAttr a x then builtins.getAttr a x else "";
-
- res = x: defaults x // x;
-
- buildScript = x: writeTextFile {
- name = "build_script.sh";
- executable = true;
- text = ''
- ${opt (res x) "unpack"}
- ${opt (res x) "build"}
- ${opt (res x) "check"}
- ${opt (res x) "install"}
- ${opt (res x) "checkInstall"}
- '';
- };
-
- defaults = x: {
- name = "${x.pname}-${x.version}";
- system = builtins.currentSystem;
- builder = "${bash}/bin/bash";
- args = [ "-e" (buildScript x) ];
- };
- in res;
-
- derivations = map (x: derivation (addDefaults x));
-
- attrMap = f: builtins.foldl' (x: y: x // f y) {};
- attrMap' = f: xs: builtins.listToAttrs (map f xs);
-}