-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
default.nix
25 lines (21 loc) · 765 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let
lockData = builtins.readFile ./flake.lock;
lock = builtins.fromJSON lockData;
flakeCompat = lock.nodes.flakeCompat.locked;
flakeCompatSrc = builtins.fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${flakeCompat.rev}.tar.gz";
sha256 = flakeCompat.narHash;
};
flake = import flakeCompatSrc {src = ./.;};
in
{system ? builtins.currentSystem, ...}:
if builtins.hasAttr system flake.defaultNix.defaultPackage
then flake.defaultNix.defaultPackage.${system}
else
builtins.throw ''
Alejandra does not support the system: ${system}
Please consider creating an issue requesting
support for such system:
https://github.com/kamadorueda/alejandra
Thank you!
''