-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
51 lines (39 loc) · 1.58 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
{
description = "A Haskell package providing some hegg rewrite rules for common algebraic identities.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
# Change 945 appropriately to select a different GHC version
# Check `nix-env -f "<nixpkgs>" -qaP -A haskell.compiler` to see available versions.
haskellPackages = pkgs.haskell.packages.ghc945;
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
packageName = "hegg-patterns";
in {
packages.${packageName} =
haskellPackages.callCabal2nix packageName self rec {
};
packages.default = self.packages.${system}.${packageName};
defaultPackage = self.packages.${system}.default;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
cabal-install
haskellPackages.haskell-language-server
haskellPackages.hlint
haskellPackages.stylish-haskell
haskellPackages.hindent
# Optional: Only needed to make use of ./justfile
just
# Optional: Only needed to make use of ./dev/cabal-gen-docs.sh
coreutils
];
inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
};
devShell = self.devShells.${system}.default;
});
}