diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 35654b0fbe46..92115080b7e8 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -249,6 +249,7 @@ in atd = runTest ./atd.nix; atop = import ./atop.nix { inherit pkgs runTest; }; atticd = runTest ./atticd.nix; + attr = pkgs.callPackage ./attr.nix { }; atuin = runTest ./atuin.nix; audiobookshelf = runTest ./audiobookshelf.nix; audit = runTest ./audit.nix; diff --git a/nixos/tests/attr.nix b/nixos/tests/attr.nix new file mode 100644 index 000000000000..782f7031038e --- /dev/null +++ b/nixos/tests/attr.nix @@ -0,0 +1,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 ]; + }; + }) +) diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index 046d19925b44..9d7965e55b5d 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -37,6 +37,9 @@ stdenv.mkDerivation rec { done ''; + # See nixos/tests/attr.nix + doCheck = false; + meta = { homepage = "https://savannah.nongnu.org/projects/attr/"; description = "Library and tools for manipulating extended attributes";