2021-08-23 21:47:29 +00:00
|
|
|
{ busybox }:
|
|
|
|
with import ./config.nix;
|
|
|
|
let
|
|
|
|
|
|
|
|
mkDerivation = args:
|
|
|
|
derivation ({
|
|
|
|
inherit system;
|
|
|
|
builder = busybox;
|
2024-03-07 09:46:47 +00:00
|
|
|
args = ["sh" "-e" args.builder or (builtins.toFile "builder-${args.name}.sh" ''
|
|
|
|
if [ -e "$NIX_ATTRS_SH_FILE" ]; then source $NIX_ATTRS_SH_FILE; fi;
|
|
|
|
eval "$buildCommand"
|
|
|
|
'')];
|
2021-08-23 21:47:29 +00:00
|
|
|
} // removeAttrs args ["builder" "meta"])
|
|
|
|
// { meta = args.meta or {}; };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
failing = mkDerivation {
|
|
|
|
name = "failing";
|
|
|
|
buildCommand = ''
|
|
|
|
echo foo > bar
|
|
|
|
exit 1
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|