-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
33 lines (33 loc) · 1.07 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
{
description = "gtk-strut";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
git-ignore-nix.url = github:hercules-ci/gitignore.nix/master;
};
outputs = { self, flake-utils, nixpkgs, git-ignore-nix }:
let
overlay = final: prev: {
haskellPackages = prev.haskellPackages.override (old: {
overrides = prev.lib.composeExtensions (old.overrides or (_: _: {}))
(hself: hsuper: {
gtk-strut =
hself.callCabal2nix "gtk-strut"
(git-ignore-nix.lib.gitignoreSource ./.)
{ };
});
});
};
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.gtk-strut ];
nativeBuildInputs = with pkgs.haskellPackages; [
cabal-install hlint ghcid ormolu implicit-hie haskell-language-server
];
};
defaultPackage = pkgs.haskellPackages.gtk-strut;
}) // { inherit overlay overlays; } ;
}