mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 18:56:16 +02:00
9d2ed0a7d3
This should make `_NIX_TEST_ACCEPT=1` work again, fixing #11369. Progress on #2503
25 lines
584 B
Nix
25 lines
584 B
Nix
{ busybox }:
|
|
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/config.nix";
|
|
let
|
|
|
|
mkDerivation = args:
|
|
derivation ({
|
|
inherit system;
|
|
builder = busybox;
|
|
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"
|
|
'')];
|
|
} // removeAttrs args ["builder" "meta"])
|
|
// { meta = args.meta or {}; };
|
|
in
|
|
{
|
|
|
|
failing = mkDerivation {
|
|
name = "failing";
|
|
buildCommand = ''
|
|
echo foo > bar
|
|
exit 1
|
|
'';
|
|
};
|
|
}
|