-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
31 lines (29 loc) · 930 Bytes
/
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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
package = "vmensa";
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
overlay = final: prev: {
main = prev.callCabal2nix package ./. { };
cmdline-util = prev.callCabal2nix "cmdline-util" (builtins.fetchGit {
url = "https://github.com/slotThe/cmdline-util";
rev = "c5d6e3832b38769be649b8dae2dd8f4659ead577";
}) { };
};
haskellPackages = pkgs.haskellPackages.extend overlay;
in {
# nix build
packages.${system}.default = haskellPackages.main;
# nix develop
devShells.${system}.default = haskellPackages.shellFor {
packages = p: [ p.main ];
buildInputs = with haskellPackages; [
cabal-install
haskell-language-server
hpack
];
};
};
}