nixpkgs/pkgs/test/overriding.nix
Artturin 9c0ac5691c tests.overriding: init
only outputs the first failing test atm
2023-01-20 19:20:03 +02:00

24 lines
627 B
Nix

{ lib, pkgs, stdenvNoCC }:
let
tests =
let
p = pkgs.python3Packages.xpybutil.overridePythonAttrs (_: { dontWrapPythonPrograms = true; });
in
[
({
name = "overridePythonAttrs";
expr = !lib.hasInfix "wrapPythonPrograms" p.postFixup;
expected = true;
})
];
in
stdenvNoCC.mkDerivation {
name = "test-overriding";
passthru = { inherit tests; };
buildCommand = ''
touch $out
'' + lib.concatMapStringsSep "\n" (t: "([[ ${lib.boolToString t.expr} == ${lib.boolToString t.expected} ]] && echo '${t.name} success') || (echo '${t.name} fail' && exit 1)") tests;
}