-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshell.nix
More file actions
106 lines (97 loc) · 2.89 KB
/
Copy pathshell.nix
File metadata and controls
106 lines (97 loc) · 2.89 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
let
pkgs = import
(fetchTarball {
# Note we should make sure everything builds with lower bound and upper bound package
# set which requires having some warnings in when compiling in both, e.g. in the lower
# bound we need to import Data.List (foldl') and in the upper bound this is a warning
# for an unused import. Technically I guess we could use CPP to clean this up but that
# is more work.
# the current upper bound
name = "release-25.11";
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/25.11.tar.gz";
sha256 = sha256:1zn1lsafn62sz6azx6j735fh4vwwghj8cc9x91g5sx2nrg23ap9k;
# # the original lower bound for packages
# name = "release-23.11";
# url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/23.11.tar.gz";
# sha256 = sha256:1ndiv385w1qyb3b18vw13991fzb9wg4cl21wglk89grsfsnra41k;
})
{ config = { allowBroken = true; }; };
haskellPackages =
pkgs.haskellPackages;
inherit (haskellPackages) callCabal2nix;
gerber = callCabal2nix "gerber" ./gerber { };
gerber-diagrams = callCabal2nix "gerber-diagrams" ./gerber-diagrams {
inherit gerber;
};
ch-hs-imports =
pkgs.haskellPackages.callPackage
({ mkDerivation
, abstract-par
, base
, containers
, deepseq
, directory
, dlist
, fetchgit
, filepath
, lib
, megaparsec
, monad-par
, monad-par-extras
, monoidal-containers
, mtl
, nonempty-containers
, optparse-applicative
, process
, text
, transformers
}:
mkDerivation {
pname = "ch-hs-imports";
version = "0.1.0.0";
src = fetchgit {
url = "https://github.com/circuithub/ch-hs-imports";
sha256 = "1ayg2pbzgy3zwb14f084s4rbp0qaxn6fygg3l4avj7pc7kxb1z2j";
rev = "7e5b0bc5bc9dde28015784e9a61270a031a126dc";
fetchSubmodules = true;
};
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
abstract-par
base
containers
deepseq
directory
dlist
filepath
megaparsec
monad-par
monad-par-extras
monoidal-containers
mtl
nonempty-containers
optparse-applicative
process
text
transformers
];
jailbreak = true;
license = lib.licenses.mit;
mainProgram = "ch-hs-imports";
})
{ };
in
haskellPackages.shellFor {
buildInputs =
[
haskellPackages.cabal-install
pkgs.treefmt
pkgs.nixpkgs-fmt
haskellPackages.haskell-language-server
haskellPackages.fourmolu
haskellPackages.cabal-fmt
ch-hs-imports
];
packages = p: [ gerber gerber-diagrams ];
}