Update assert

This commit is contained in:
Mateusz Słodkowicz 2025-05-18 09:24:02 +02:00
parent c3cd49a38c
commit f2a598668b
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
1 changed files with 23 additions and 7 deletions

View File

@ -179,7 +179,18 @@
message = "MKK must be build with --impure";
}
{
assertion = (builtins.readFile "${mkkArg.configRootPath}/private/check-encryption") == "DECRYPTED";
assertion =
let
file = ../private/check-encryption;
resultFile = pkgs.runCommandLocal "check-encryption" { src = file; } ''
if [[ "$(< $src)" != "DECRYPTED" ]]; then
echo -n "no" >> $out;
else
echo -n "yes" >> $out;
fi
'';
in
(builtins.readFile resultFile == "yes");
message = "Need to decrypt MKK repo to build";
}
];
@ -193,10 +204,15 @@
stable = mkkArg.stable;
current = mkkArg.current;
nixerusPkgs =
(import mkkArg.current.nixerus { inherit pkgs; }) //
(if (pkgs.system == "x86_64-linux") then {
(import mkkArg.current.nixerus { inherit pkgs; })
// (
if (pkgs.system == "x86_64-linux") then
{
i686Linux = import mkkArg.current.nixerus { pkgs = pkgs.pkgsi686Linux; };
} else {});
}
else
{ }
);
arg = mkkArg;
rootFlake = (builtins.getFlake mkkArg.configRootPath);