summaryrefslogtreecommitdiffstats
path: root/nixos/tests/attr.nix
blob: 782f7031038e37fcc752e3146c64fb34f9740fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# The reason this lives in nixos/tests is because `attr` is a bootstrap package,
# and it's very non-trivial to use `vmTools` in its passthru.
#
# The reason we need vmTools in the first place is because we don't allow
# extended attributes in the sandbox.
{
  lib,
  vmTools,
  attr,
  perl,
}:
vmTools.runInLinuxVM (
  attr.overrideAttrs (oa: {
    nativeCheckInputs = [ perl ];
    preCheck = "patchShebangs test";

    # FIXME(balsoft): half of the test suite is skipped because the hacky test
    # harness doesn't know that we're root even though we are (it's looking for
    # /etc/group, which we don't have). Probably best to submit a fix upstream
    # rather than patch it ourselves.
    doCheck = true;
    memSize = 4096;

    meta = oa.meta // {
      maintainers = oa.meta.maintainers or [ ] ++ [ lib.maintainers.balsoft ];
    };
  })
)