From bf388af66e5b62f8d982320a096efc4e394315ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 5 Feb 2023 10:29:13 +0100 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20use=20content-addressed=20deriv?= =?UTF-8?q?ations=20(for=20now)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/default.nix | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 59690bd..7d7286b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,4 +1,4 @@ -system: { nixpkgs, ... } @ args: rec { +system: {nixpkgs, ...} @ args: rec { inherit (builtins) toFile; allPrebuilds = builtins.path { @@ -8,21 +8,18 @@ system: { nixpkgs, ... } @ args: rec { prebuilts = "${allPrebuilds}/${system}"; - baseDerivation = { script, ... } @args: builtins.derivation (args // { - __contentAddressed = true; - outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - inherit system; - builder = "${prebuilts}/busybox"; - args = [ - "sh" - (toFile "${args.name}-builder.sh" ( - '' - set -ex - export PATH=${prebuilts} - eval "$script" - '' - )) - ]; - }); + baseDerivation = {script, ...} @ args: + builtins.derivation (args + // { + inherit system; + builder = "${prebuilts}/busybox"; + PATH = "${prebuilts}"; + args = [ + "sh" + (toFile "${args.name}-builder.sh" '' + set -ex + eval "$script" + '') + ]; + }); }