-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (54 loc) · 1.64 KB
/
flake.nix
File metadata and controls
62 lines (54 loc) · 1.64 KB
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
62
{
description = "Minimal project-style Taffybar template with Nix flakes";
inputs = {
taffybar = {
url = "github:taffybar/taffybar";
};
nixpkgs.follows = "taffybar/nixpkgs";
flake-utils.follows = "taffybar/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
taffybar,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [taffybar.overlays.default];
config.allowBroken = true;
};
hpkgs = pkgs.haskellPackages.extend (
hself: hsuper: {
# Keep this template build focused on the template package in CI.
taffybar = pkgs.haskell.lib.dontCheck hsuper.taffybar;
nix-taffybar-template = hself.callCabal2nix "nix-taffybar-template" ./. {};
}
);
templatePackage = hpkgs.nix-taffybar-template;
in {
packages = {
default = templatePackage;
nix-taffybar-template = templatePackage;
};
apps.default = {
type = "app";
program = "${templatePackage}/bin/taffybar";
meta.description = "Run the template taffybar binary";
};
checks.default = templatePackage;
devShells.default = hpkgs.shellFor {
packages = p: [p.nix-taffybar-template];
nativeBuildInputs = [
pkgs.cabal-install
pkgs.haskell-language-server
pkgs.ormolu
];
};
});
nixConfig = {
extra-substituters = ["https://haskell-language-server.cachix.org"];
extra-trusted-public-keys = ["haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8="];
};
}