3
0
Fork 0
forked from mirrors/nixpkgs

tests/stdenv: Check derivations with an MD5 outputHash fail to evaluate

This commit is contained in:
nicoo 2023-09-14 17:30:52 +00:00
parent 87c22100a6
commit 1cabb1c445

View file

@ -142,6 +142,15 @@ in
'';
};
# Check that mkDerivation rejects MD5 hashes
rejectedHashes = lib.recurseIntoAttrs {
md5 =
let drv = runCommand "md5 outputHash rejected" {
outputHash = "md5-fPt7dxVVP7ffY3MxkQdwVw==";
} "true";
in assert !(builtins.tryEval drv).success; {};
};
test-inputDerivation = let
inherit (stdenv.mkDerivation {
dep1 = derivation { name = "dep1"; builder = "/bin/sh"; args = [ "-c" ": > $out" ]; system = builtins.currentSystem; };