mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2026-06-13 00:09:09 +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 = {
|
perSystem = {
|
||||||
system,
|
system,
|
||||||
inputs',
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
|
@ -72,11 +71,14 @@
|
||||||
"nil"
|
"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;
|
name = input;
|
||||||
value = inputs'.${input}.packages.default or (builtins.throw "Input ${input} does not provide a default package");
|
value = pkg;
|
||||||
})
|
})
|
||||||
fromInputs);
|
fromInputs);
|
||||||
in
|
in
|
||||||
base // mappedPkgs;
|
base // mappedPkgs;
|
||||||
|
|
||||||
|
|
@ -87,10 +89,12 @@
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
config.packages.alejandra-custom
|
config.packages.alejandra-custom
|
||||||
pkgs.fd
|
pkgs.fd
|
||||||
|
pkgs.deno
|
||||||
];
|
];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
fd "$@" -t f -e nix -x alejandra -q '{}'
|
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