nix-plugin-pijul.tests: fix the eval (#346689)

This commit is contained in:
Robert Hensing 2024-10-05 20:01:54 +02:00 committed by GitHub
commit 7be243f421
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,9 +11,11 @@
runCommand,
pijul,
nixVersions,
nixOverride ? null,
nix-plugin-pijul,
}:
stdenv.mkDerivation (finalAttrs: {
let nix = if nixOverride != null then nixOverride else nixVersions.nix_2_18;
in stdenv.mkDerivation (finalAttrs: {
pname = "nix-plugin-pijul";
version = "0.1.4";
@ -30,12 +32,12 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
boost
howard-hinnant-date
nixVersions.nix_2_18
nix
];
passthru.tests = let
localRepoCheck = nix:
runCommand "localRepoCheck-${nix.name}"
localRepoCheck = nixOverride:
runCommand "localRepoCheck-${nixOverride.name}"
{
nativeBuildInputs = [
pijul
@ -56,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
output=$(
nix \
--option plugin-files ${nix-plugin-pijul.override {inherit nix;}}/lib/nix/plugins/pijul.so \
--option plugin-files ${nix-plugin-pijul.override {inherit nixOverride;}}/lib/nix/plugins/pijul.so \
--extra-experimental-features 'nix-command flakes' \
eval --impure --raw --expr "builtins.readFile ((builtins.fetchTree \"pijul+file://$PWD\") + \"/foo\")"
)