Skip to content

Commit

Permalink
stylix: make nix-flake-check package execution location-independent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
trueNAHO committed Jan 6, 2025
1 parent 0365d80 commit def1e48
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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}#{}
'
'';
};

Expand Down

0 comments on commit def1e48

Please sign in to comment.