generated from SheetKey/HaskellProjectTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
57 lines (46 loc) · 1.72 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
{
description = "A Haskell project template.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
# Example of adding or overriding a package:
# "example-input" should be added to the outputs,
# i.e., "output = { self, nixpkgs, flake-utils, example-input }:"
# exapmle-input = {
# url = "github:SheetKey/tigris";
# flake = true;
# };
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
haskellPackages = pkgs.haskellPackages;
packageName = "vox-hs";
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
in {
packages.${packageName} = # (ref:haskell-package-def)
haskellPackages.callCabal2nix packageName self rec {
# Dependency overrides go here
# Ex with gi-gtk-declarative:
# If version is broken then:
# gi-gtk-declarative = jailbreakUnbreak haskeppPackages.gi-gtk-declarative;
# or if tests failing:
# gi-gtk-declarative = pkgs.haskell.lib.dontCheck haskellPackages.gi-gtk-declarative;
#example = haskellPackages.callCabal2nix "example" example-input { };
};
defaultPackage = self.packages.${system}.${packageName};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
ghc
cabal-install
haskell-language-server
haskellPackages.implicit-hie
cabal2nix
];
inputsFrom = builtins.attrValues self.packages.${system};
};
}
);
}