From f305e717d38a278d533d3431efd71fcfdee1622d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 29 Apr 2024 21:16:25 +0200 Subject: [PATCH] quartus-prime-lite: run tests with NIXPKGS_QUARTUS_REPRODUCIBLE_BUILD=1 To prevent the reproducible build code path from regressing. Also adapt the buildSof test to output the hash of the build artifact, so it's easy to verify that the build is reproducible: $ NIXPKGS_ALLOW_UNFREE=1 nix-build -A quartus-prime-lite.tests.buildSof $ NIXPKGS_ALLOW_UNFREE=1 nix-build -A quartus-prime-lite.tests.buildSof --check --- .../applications/editors/quartus-prime/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/quartus-prime/default.nix b/pkgs/applications/editors/quartus-prime/default.nix index 8358bb7f160c..a5d39818639e 100644 --- a/pkgs/applications/editors/quartus-prime/default.nix +++ b/pkgs/applications/editors/quartus-prime/default.nix @@ -150,6 +150,7 @@ in buildFHSEnv rec { tests = { buildSof = runCommand "quartus-prime-lite-test-build-sof" { nativeBuildInputs = [ quartus-prime-lite ]; + env.NIXPKGS_QUARTUS_REPRODUCIBLE_BUILD = "1"; } '' cat >mydesign.vhd < "$out" ''; - questaEncryptedModel = runCommand "quartus-prime-lite-test-questa-encrypted-model" {} '' - "${quartus-prime-lite}/bin/vlog" "${quartus-prime-lite.unwrapped}/questa_fse/intel/verilog/src/arriav_atoms_ncrypt.v" - touch "$out" - ''; + questaEncryptedModel = runCommand "quartus-prime-lite-test-questa-encrypted-model" + { env.NIXPKGS_QUARTUS_REPRODUCIBLE_BUILD = "1"; + } + '' + "${quartus-prime-lite}/bin/vlog" "${quartus-prime-lite.unwrapped}/questa_fse/intel/verilog/src/arriav_atoms_ncrypt.v" + touch "$out" + ''; }; };