-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
71 lines (59 loc) · 2.33 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
description = "A Haskell project template.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils";
rhine-unstable = {
url = "github:turion/rhine";
flake = false;
};
rhine-pinned = {
url = "github:turion/rhine/ed6476e4040417ab97ab3896dc8cdc312607c3d9";
flake = false;
};
vox-hs-in = {
url = "github:SheetKey/vox-hs";
flake = true;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, rhine-unstable, vox-hs-in, rhine-pinned }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system}.extend (final: prev: {
config = prev.config // { allowBroken = true; };
haskellPackages = prev.haskellPackages.extend (hfinal: hprev: {
vox-hs = vox-hs-in.packages.${system}.vox-hs;
});
});
# haskellPackages = pkgs.haskellPackages;
packageName = "tigris";
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
in {
packages.${packageName} = # (ref:haskell-package-def)
pkgs.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;
# rhine = jailbreakUnbreak (pkgs.haskellPackages.callCabal2nix "rhine" (rhine-unstable + "/rhine") { });
rhine = jailbreakUnbreak pkgs.haskellPackages.rhine;
# rhine = jailbreakUnbreak (pkgs.haskellPackages.callCabal2nix "rhine" (rhine-pinned + "/rhine") {});
vox-hs = jailbreakUnbreak pkgs.haskellPackages.vox-hs;
};
defaultPackage = self.packages.${system}.${packageName};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
ghc
cabal-install
haskell-language-server
haskellPackages.implicit-hie
];
inputsFrom = builtins.attrValues self.packages.${system};
};
}
);
}