aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/failing.nix
blob: 2a0350d4d25e8d4b00edcedee0ef0bd1e0553110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ busybox }:
with import ./config.nix;
let

  mkDerivation = args:
    derivation ({
      inherit system;
      builder = busybox;
      args = ["sh" "-e" args.builder or (builtins.toFile "builder-${args.name}.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
    } // removeAttrs args ["builder" "meta"])
    // { meta = args.meta or {}; };
in
{

  failing = mkDerivation {
    name = "failing";
    buildCommand = ''
      echo foo > bar
      exit 1
    '';
  };
}