nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 idris2Packages,
4 fetchFromGitHub,
5 clang,
6 chez,
7 gmp,
8 gnumake,
9 zsh,
10 makeBinaryWrapper,
11 stdenv,
12}:
13let
14 inherit (idris2Packages) idris2Api buildIdris;
15
16 elab-util = buildIdris {
17 ipkgName = "elab-util";
18 version = "2025-08-14";
19 src = fetchFromGitHub {
20 owner = "stefan-hoeck";
21 repo = "idris2-elab-util";
22 rev = "6786ac7ef9931b1c8321a83e007f36a66e139e86";
23 hash = "sha256-qInoAE28tEJIP8/R0Yjgn/+DoIDzI3GU8BAyWaIrrJE=";
24 };
25 idrisLibraries = [ ];
26 };
27
28 filepath = buildIdris {
29 ipkgName = "filepath";
30 version = "2024-10-06";
31 src = fetchFromGitHub {
32 owner = "stefan-hoeck";
33 repo = "idris2-filepath";
34 rev = "0441eaee9ff1d921fc3f4619c2a8d542588c0e99";
35 hash = "sha256-HiaT1Ggbzm7aAEMnCobhhavdheKbYyMA5D9BO0cdG7Y=";
36 };
37 idrisLibraries = [ ];
38 };
39
40 getopts = buildIdris {
41 ipkgName = "getopts";
42 version = "2023-10-28";
43 src = fetchFromGitHub {
44 owner = "idris-community";
45 repo = "idris2-getopts";
46 rev = "0d41b98f83f3707deb0ffbc595ef36b7d9cb9eab";
47 hash = "sha256-CthWByg4uFic0ktri1AuFqkHtyRzIUrreCTegQgdpVo=";
48 };
49 idrisLibraries = [ ];
50 };
51
52 algebra = buildIdris {
53 ipkgName = "algebra";
54 version = "2024-04-05";
55 src = fetchFromGitHub {
56 owner = "stefan-hoeck";
57 repo = "idris2-algebra";
58 rev = "829f44b7fd961e3f0a7ad9174b395f97ebc33336";
59 hash = "sha256-etsWqF07j/XBgfnlaA8pyF06BeoXqg7iViG0o09s4Zc=";
60 };
61 idrisLibraries = [ ];
62 };
63
64 ref1 = buildIdris {
65 ipkgName = "ref1";
66 version = "2025-10-30";
67 src = fetchFromGitHub {
68 owner = "stefan-hoeck";
69 repo = "idris2-ref1";
70 rev = "ef6d4265deaa6a4f1b5228932102847a4e54e4d2";
71 hash = "sha256-NwA6KezZFdF/ZGTOf3Z1zDjsGiy2hgYinGPeeofhZfw=";
72 };
73 idrisLibraries = [ ];
74 };
75
76 array = buildIdris {
77 ipkgName = "array";
78 version = "2025-10-30";
79 src = fetchFromGitHub {
80 owner = "stefan-hoeck";
81 repo = "idris2-array";
82 rev = "cecbd1dd3bae94669a2ed3689ee91ce1616cc34f";
83 hash = "sha256-fRhIzkvL7n7wyXNQE3LHalexqYmTt6RVPoVEOqTb7d4=";
84 };
85 idrisLibraries = [
86 algebra
87 ref1
88 ];
89 };
90
91 bytestring = buildIdris {
92 ipkgName = "bytestring";
93 version = "2025-10-02";
94 src = fetchFromGitHub {
95 owner = "stefan-hoeck";
96 repo = "idris2-bytestring";
97 rev = "082c5114b4016425c9957e955e22fcb0b194ada4";
98 hash = "sha256-KuHa1pDfsR4BmBiaw7k6ghZMf2/b+5AQc5I+NuQqbyw=";
99 };
100 idrisLibraries = [
101 algebra
102 array
103 ];
104 };
105
106 refined = buildIdris {
107 ipkgName = "refined";
108 version = "2024-04-05";
109 src = fetchFromGitHub {
110 owner = "stefan-hoeck";
111 repo = "idris2-refined";
112 rev = "c585013c33ad5398c91beed71fec61a5b721a8da";
113 hash = "sha256-9YQjVpJ5McpgjJx6hXCaXMKyEAFCnynw4ahHdY3Kz8Y=";
114 };
115 idrisLibraries = [
116 elab-util
117 algebra
118 ];
119 };
120
121 ilex-core = buildIdris {
122 ipkgName = "core/ilex-core";
123 version = "2025-10-31";
124 src = fetchFromGitHub {
125 owner = "stefan-hoeck";
126 repo = "idris2-ilex";
127 rev = "c2d5a219c701a8f694aa95e8d34c7a58d58e5795";
128 hash = "sha256-EseTOCNr0EuYqrjEd2SLqSz5ONOO3hRYghrHul0ccPA=";
129 };
130 idrisLibraries = [
131 elab-util
132 bytestring
133 ];
134 };
135
136 ilex = buildIdris {
137 ipkgName = "ilex";
138 version = "2025-10-31";
139 src = fetchFromGitHub {
140 owner = "stefan-hoeck";
141 repo = "idris2-ilex";
142 rev = "c2d5a219c701a8f694aa95e8d34c7a58d58e5795";
143 hash = "sha256-EseTOCNr0EuYqrjEd2SLqSz5ONOO3hRYghrHul0ccPA=";
144 };
145 idrisLibraries = [
146 elab-util
147 algebra
148 array
149 bytestring
150 ilex-core
151 refined
152 ];
153 };
154
155 ilex-toml = buildIdris {
156 ipkgName = "toml/ilex-toml";
157 version = "2025-10-31";
158 src = fetchFromGitHub {
159 owner = "stefan-hoeck";
160 repo = "idris2-ilex";
161 rev = "c2d5a219c701a8f694aa95e8d34c7a58d58e5795";
162 hash = "sha256-EseTOCNr0EuYqrjEd2SLqSz5ONOO3hRYghrHul0ccPA=";
163 };
164 idrisLibraries = [
165 ilex
166 refined
167 ];
168 };
169
170 packPkg = buildIdris {
171 ipkgName = "pack";
172 version = "2025-12-27";
173 src = fetchFromGitHub {
174 owner = "stefan-hoeck";
175 repo = "idris2-pack";
176 rev = "cd512a0bf61a6effacc24060bb04106a849df0fe";
177 hash = "sha256-309k3ALAnCno8C09Fy7zz/oiSCzKI2ZbH5WFn6QIwF0=";
178 };
179 idrisLibraries = [
180 idris2Api
181 elab-util
182 filepath
183 getopts
184 ilex-toml
185 ];
186
187 nativeBuildInputs = [ makeBinaryWrapper ];
188
189 buildInputs = [
190 gmp
191 clang
192 chez
193 gnumake
194 ]
195 ++ lib.optionals stdenv.hostPlatform.isDarwin [ zsh ];
196
197 postInstall = ''
198 wrapProgram $out/bin/pack \
199 --suffix C_INCLUDE_PATH : ${lib.makeIncludePath [ gmp ]} \
200 --suffix PATH : ${
201 lib.makeBinPath (
202 [
203 clang
204 chez
205 gnumake
206 ]
207 ++ lib.optionals stdenv.hostPlatform.isDarwin [ zsh ]
208 )
209 }
210 '';
211
212 meta = {
213 description = "Idris2 Package Manager with Curated Package Collections";
214 mainProgram = "pack";
215 homepage = "https://github.com/stefan-hoeck/idris2-pack";
216 license = lib.licenses.bsd3;
217 maintainers = with lib.maintainers; [
218 mattpolzin
219 mithicspirit
220 ];
221 inherit (idris2Packages.idris2.meta) platforms;
222 };
223 };
224in
225packPkg.executable