stylix: make nix-flake-check package execution location-independent

Make the execution of the nix-flake-check package independent of the
current working directory, making the following command work as
expected:

    nix run github:danth/stylix#nix-flake-check

This is especially convenient for testing PRs locally without checking
them out.
This commit is contained in:
NAHO 2025-01-06 17:42:47 +01:00
parent 0365d80e2d
commit def1e485d5
No known key found for this signature in database
GPG key ID: 229CB671D09B95F5

View file

@ -155,7 +155,7 @@
];
text = ''
nix flake show --json --no-update-lock-file |
nix flake show --json --no-update-lock-file ${self} |
jq --raw-output '
((.checks."${system}" // {}) | keys) as $checks |
((.packages."${system}" // {}) | keys) as $packages |
@ -168,7 +168,10 @@
--color-failed \
--halt now,fail=1 \
--tagstring '{}' \
'nix build --no-update-lock-file --print-build-logs .#{}'
'
nix build --no-update-lock-file --print-build-logs \
${self}#{}
'
'';
};