summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-10-26 18:01:02 +0000
committerGitHub <noreply@github.com>2023-10-26 18:01:02 +0000
commit96132a216a919e3260941c67161b5f16c6a85880 (patch)
tree55964a141e571c641c703e4251d97785c8e301d3 /pkgs/test
parent23c525f8dadc3caf0b00a1406ad5a6bd76ea5357 (diff)
parentadcaf3962d5147cec7d63c1ff9e3f7a3fe4653d4 (diff)
downloadnixpkgs-96132a216a919e3260941c67161b5f16c6a85880.tar
nixpkgs-96132a216a919e3260941c67161b5f16c6a85880.tar.gz
nixpkgs-96132a216a919e3260941c67161b5f16c6a85880.tar.bz2
nixpkgs-96132a216a919e3260941c67161b5f16c6a85880.tar.lz
nixpkgs-96132a216a919e3260941c67161b5f16c6a85880.tar.xz
nixpkgs-96132a216a919e3260941c67161b5f16c6a85880.tar.zst
nixpkgs-96132a216a919e3260941c67161b5f16c6a85880.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/stdenv/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/test/stdenv/default.nix b/pkgs/test/stdenv/default.nix
index 0fa87cccc21..3882eb2b625 100644
--- a/pkgs/test/stdenv/default.nix
+++ b/pkgs/test/stdenv/default.nix
@@ -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; };