mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2026-06-10 07:00:04 +00:00
flake: don't throw on invalid systems
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I054d83838ef0aba0d2a233b7da3802f06a6a6964
This commit is contained in:
parent
da760088c8
commit
d0b64d0854
1 changed files with 8 additions and 4 deletions
12
flake.nix
12
flake.nix
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
perSystem = {
|
||||
system,
|
||||
inputs',
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
|
|
@ -72,11 +71,14 @@
|
|||
"nil"
|
||||
];
|
||||
|
||||
mappedPkgs = listToAttrs (map (input: {
|
||||
mappedPkgs = listToAttrs (builtins.concatMap (input: let
|
||||
pkg = ((inputs.${input}.packages or {}).${system} or {}).default or null;
|
||||
in
|
||||
lib.optional (pkg != null) {
|
||||
name = input;
|
||||
value = inputs'.${input}.packages.default or (builtins.throw "Input ${input} does not provide a default package");
|
||||
value = pkg;
|
||||
})
|
||||
fromInputs);
|
||||
fromInputs);
|
||||
in
|
||||
base // mappedPkgs;
|
||||
|
||||
|
|
@ -87,10 +89,12 @@
|
|||
runtimeInputs = [
|
||||
config.packages.alejandra-custom
|
||||
pkgs.fd
|
||||
pkgs.deno
|
||||
];
|
||||
|
||||
text = ''
|
||||
fd "$@" -t f -e nix -x alejandra -q '{}'
|
||||
fd "$@" -t f -e md -x deno fmt '{}'
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue