-
Notifications
You must be signed in to change notification settings - Fork 12
/
flake.nix
60 lines (51 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
{
description = "Highly performant and configurable DWM status service";
inputs = {
naersk = {
url = "github:nmattia/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, naersk, nixpkgs }:
let
system = "x86_64-linux";
naersk-lib = naersk.lib.${system};
pkgs = nixpkgs.legacyPackages.${system};
package = import ./. {
inherit naersk-lib pkgs;
};
name = package.pname;
nameWithGlobalAlsaUtils = "${name}-global-alsa-utils";
app = {
type = "app";
program = "${package}/bin/${name}";
};
in
{
packages.${system} = {
default = package;
${name} = package;
${nameWithGlobalAlsaUtils} = import ./. {
inherit naersk-lib pkgs;
useGlobalAlsaUtils = true;
};
};
apps.${system} = {
default = app;
${name} = app;
};
overlays.default = final: prev:
let
args = {
naersk-lib = (naersk.overlay final prev).naersk;
pkgs = prev;
};
in
{
${name} = import ./. args;
${nameWithGlobalAlsaUtils} = import ./. (args // { useGlobalAlsaUtils = true; });
};
devShells.${system}.default = import ./shell.nix { inherit pkgs; };
};
}