forked from taffybar/taffybar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
51 lines (47 loc) · 1.73 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
{
inputs = {
flake-utils.url = github:numtide/flake-utils;
git-ignore-nix.url = github:hercules-ci/gitignore.nix/master;
gtk-sni-tray.url = github:taffybar/gtk-sni-tray/master;
gtk-strut.url = github:taffybar/gtk-strut/master;
};
outputs = {
self, flake-utils, nixpkgs, git-ignore-nix, gtk-sni-tray, gtk-strut
}:
let
overlay = final: prev: {
haskellPackages = prev.haskellPackages.override (old: {
overrides = prev.lib.composeExtensions (old.overrides or (_: _: {}))
(hself: hsuper: {
taffybar =
hself.callCabal2nix "taffybar"
(git-ignore-nix.lib.gitignoreSource ./.)
{ inherit (final) gtk3; };
coinbase-pro = hself.callHackageDirect {
pkg = "coinbase-pro";
ver = "0.9.2.2";
sha256 = "sha256-ZFEcq9aO+72JSVBg0xWi188mz5WK1NTgs6ZGYHtO0OE=";
} { };
dyre = prev.haskell.lib.dontCheck (hself.callHackageDirect {
pkg = "dyre";
ver = "0.9.1";
sha256 = "sha256-3ClPPbNm5wQI+QHaR0Rtiye2taSTF3IlWgfanud6wLg=";
} { });
});
});
};
overlays = gtk-strut.overlays ++ gtk-sni-tray.overlays ++ [ overlay ];
in flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; };
in
rec {
devShell = pkgs.haskellPackages.shellFor {
packages = p: [ p.taffybar ];
nativeBuildInputs = with pkgs.haskellPackages; [
cabal-install hlint ghcid ormolu implicit-hie haskell-language-server
];
};
buildInputs = [ pkgs.haskellPackages.cabal-install ];
defaultPackage = pkgs.haskellPackages.taffybar;
}) // { inherit overlay overlays; } ;
}