diff --git a/busybox.nix b/busybox.nix index ec06e33..575c904 100644 --- a/busybox.nix +++ b/busybox.nix @@ -40,4 +40,26 @@ in rec { passAsFile = [ "buildscript" ]; args = [ "sh" "-c" "${busybox}/busybox sh $buildscriptPath" ]; }; + + shellDerivation = { name + , buildscript + }: builtins.derivation { + system = "x86_64-linux"; + inherit name; + builder = utils + /sh; + shellenvironment = '' + export PATH=${utils} + sh $buildscriptPath + ''; + inherit buildscript; + passAsFile = [ "shellenvironment" "buildscript" ]; + args = [ "-c" "${utils}/sh $shellenvironmentPath" ]; + }; + + test = shellDerivation { + name = "test"; + buildscript = '' + w > $out + ''; + }; }