From 27fe4cc810d630b3933bbb666776e510050b0f9e Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Sun, 21 Nov 2021 08:23:16 +0000 Subject: Remove stdenv/fetch things It was a bit too much effort for now. Specifically, making fetch helpers that don't download the item to hash it are a little more involved. I might come back to this stuff in the future (although it might end up in a separate repo). --- stdenv.nix | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 stdenv.nix (limited to 'stdenv.nix') 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); -} -- cgit v1.2.1