-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
61 lines (57 loc) · 1.37 KB
/
flake.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description = "KDE Plasma Window Decoration consisting of single colorful rectangle";
outputs =
{
self,
nixpkgs,
}:
let
systems = [
"aarch64-linux"
"x86_64-linux"
] ++ nixpkgs.lib.optional (builtins ? currentSystem) builtins.currentSystem;
build =
f: attrs: system:
let
config = f system;
merge =
attrs: key:
let
base = (attrs.${key} or { });
moved = {
${system} = config.${key};
};
new = {
${key} = base // moved;
};
in
attrs // new;
in
builtins.foldl' merge attrs (builtins.attrNames config);
eachSystem = f: builtins.foldl' (build f) { } systems;
in
eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
arstotzka = pkgs.callPackage ./package.nix { };
in
{
packages = {
inherit arstotzka;
default = arstotzka;
};
devShells = {
default = import ./shell.nix { inherit pkgs arstotzka; };
};
}
)
// {
overlays.default = final: prev: {
arstotzka = prev.callPackage ./package.nix { };
};
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
}