Skip to content

Commit 0b29550

Browse files
committed
Bring nix-tools build into haskell.nix
I plan to delete the auto-generated nix expressions in nix-tools so that it is a pure cabal project.
1 parent 2c8f45c commit 0b29550

File tree

9 files changed

+1267
-20
lines changed

9 files changed

+1267
-20
lines changed

default.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ let
106106

107107
# Programs for generating Nix expressions from Cabal and Stack
108108
# files.
109-
nix-tools = self.callPackage ./nix-tools {
110-
inherit fetchExternal;
111-
};
109+
nix-tools = self.callPackage ./nix-tools {};
112110

113111
# Snapshots of Hackage and Stackage, converted to Nix expressions,
114112
# regularly updated.

nix-tools/.plan-pkgs.nix

Lines changed: 381 additions & 0 deletions
Large diffs are not rendered by default.

nix-tools/.plan.nix/hackage-db.nix

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
2+
{
3+
flags = { install-examples = false; };
4+
package = {
5+
specVersion = "1.10";
6+
identifier = { name = "hackage-db"; version = "2.0.1"; };
7+
license = "BSD-3-Clause";
8+
copyright = "";
9+
maintainer = "Peter Simons <simons@cryp.to>";
10+
author = "Peter Simons, Alexander Altman, Ben James";
11+
homepage = "https://github.com/peti/hackage-db#readme";
12+
url = "";
13+
synopsis = "Access cabal-install's Hackage database via Data.Map";
14+
description = "This library provides convenient access to the local copy of the Hackage\ndatabase that \"cabal update\" creates. Check out\nhttps://github.com/peti/hackage-db/tree/master/example/ for a collection of\nsimple example programs that demonstrate how to use this code.";
15+
buildType = "Simple";
16+
};
17+
components = {
18+
"library" = {
19+
depends = [
20+
(hsPkgs.base)
21+
(hsPkgs.Cabal)
22+
(hsPkgs.containers)
23+
(hsPkgs.aeson)
24+
(hsPkgs.bytestring)
25+
(hsPkgs.directory)
26+
(hsPkgs.filepath)
27+
(hsPkgs.tar)
28+
(hsPkgs.time)
29+
(hsPkgs.utf8-string)
30+
];
31+
};
32+
exes = {
33+
"list-known-versions" = {
34+
depends = (pkgs.lib).optionals (flags.install-examples) [
35+
(hsPkgs.base)
36+
(hsPkgs.Cabal)
37+
(hsPkgs.containers)
38+
(hsPkgs.hackage-db)
39+
(hsPkgs.bytestring)
40+
];
41+
};
42+
"show-meta-data" = {
43+
depends = (pkgs.lib).optionals (flags.install-examples) [
44+
(hsPkgs.base)
45+
(hsPkgs.Cabal)
46+
(hsPkgs.containers)
47+
(hsPkgs.hackage-db)
48+
(hsPkgs.utf8-string)
49+
];
50+
};
51+
"show-package-versions" = {
52+
depends = (pkgs.lib).optionals (flags.install-examples) [
53+
(hsPkgs.base)
54+
(hsPkgs.Cabal)
55+
(hsPkgs.containers)
56+
(hsPkgs.hackage-db)
57+
];
58+
};
59+
};
60+
};
61+
} // {
62+
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
63+
url = "https://github.com/ElvishJerricco/hackage-db.git";
64+
rev = "84ca9fc75ad45a71880e938e0d93ea4bde05f5bd";
65+
sha256 = "0y3kw1hrxhsqmyx59sxba8npj4ya8dpgjljc21gkgdvdy9628q4c";
66+
});
67+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
2+
{
3+
flags = {};
4+
package = {
5+
specVersion = "1.8";
6+
identifier = { name = "haskell-src-meta"; version = "0.8.0.5"; };
7+
license = "BSD-3-Clause";
8+
copyright = "(c) Matt Morrow";
9+
maintainer = "Ben Millwood <haskell@benmachine.co.uk>";
10+
author = "Matt Morrow";
11+
homepage = "";
12+
url = "";
13+
synopsis = "Parse source to template-haskell abstract syntax.";
14+
description = "The translation from haskell-src-exts abstract syntax\nto template-haskell abstract syntax isn't 100% complete yet.";
15+
buildType = "Simple";
16+
};
17+
components = {
18+
"library" = {
19+
depends = [
20+
(hsPkgs.base)
21+
(hsPkgs.haskell-src-exts)
22+
(hsPkgs.pretty)
23+
(hsPkgs.syb)
24+
(hsPkgs.template-haskell)
25+
(hsPkgs.th-orphans)
26+
] ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "7.8") (hsPkgs.safe);
27+
};
28+
tests = {
29+
"unit" = {
30+
depends = [
31+
(hsPkgs.HUnit)
32+
(hsPkgs.base)
33+
(hsPkgs.haskell-src-exts)
34+
(hsPkgs.haskell-src-meta)
35+
(hsPkgs.pretty)
36+
(hsPkgs.template-haskell)
37+
(hsPkgs.test-framework)
38+
(hsPkgs.test-framework-hunit)
39+
];
40+
};
41+
"splices" = { depends = [ (hsPkgs.base) (hsPkgs.haskell-src-meta) ]; };
42+
};
43+
};
44+
} // {
45+
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
46+
url = "https://github.com/galenhuntington/haskell-src-meta.git";
47+
rev = "109ee29d5fd0f4e23fdd2f80eb122d66341b64a9";
48+
sha256 = "08qw6y9br6fy3qkwl9v2kp38msprsq9v1ssym0fsnj2jm0vbnfrx";
49+
});
50+
}

nix-tools/.plan.nix/hnix.nix

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
2+
{
3+
flags = { optimize = false; profiling = false; tracing = false; };
4+
package = {
5+
specVersion = "1.10";
6+
identifier = { name = "hnix"; version = "0.5.2"; };
7+
license = "BSD-3-Clause";
8+
copyright = "";
9+
maintainer = "johnw@newartisans.com";
10+
author = "John Wiegley";
11+
homepage = "https://github.com/haskell-nix/hnix#readme";
12+
url = "";
13+
synopsis = "Haskell implementation of the Nix language";
14+
description = "Haskell implementation of the Nix language.";
15+
buildType = "Simple";
16+
};
17+
components = {
18+
"library" = {
19+
depends = (((([
20+
(hsPkgs.aeson)
21+
(hsPkgs.array)
22+
(hsPkgs.base)
23+
(hsPkgs.binary)
24+
(hsPkgs.bytestring)
25+
(hsPkgs.containers)
26+
(hsPkgs.data-fix)
27+
(hsPkgs.deepseq)
28+
(hsPkgs.dependent-sum)
29+
(hsPkgs.deriving-compat)
30+
(hsPkgs.directory)
31+
(hsPkgs.exceptions)
32+
(hsPkgs.filepath)
33+
(hsPkgs.free)
34+
(hsPkgs.hashing)
35+
(hsPkgs.http-client)
36+
(hsPkgs.http-client-tls)
37+
(hsPkgs.http-types)
38+
(hsPkgs.interpolate)
39+
(hsPkgs.lens-family-th)
40+
(hsPkgs.logict)
41+
(hsPkgs.megaparsec)
42+
(hsPkgs.monadlist)
43+
(hsPkgs.mtl)
44+
(hsPkgs.optparse-applicative)
45+
(hsPkgs.parser-combinators)
46+
(hsPkgs.prettyprinter)
47+
(hsPkgs.process)
48+
(hsPkgs.ref-tf)
49+
(hsPkgs.regex-tdfa)
50+
(hsPkgs.regex-tdfa-text)
51+
(hsPkgs.scientific)
52+
(hsPkgs.semigroups)
53+
(hsPkgs.split)
54+
(hsPkgs.syb)
55+
(hsPkgs.template-haskell)
56+
(hsPkgs.text)
57+
(hsPkgs.these)
58+
(hsPkgs.time)
59+
(hsPkgs.transformers)
60+
(hsPkgs.unix)
61+
(hsPkgs.unordered-containers)
62+
(hsPkgs.vector)
63+
(hsPkgs.xml)
64+
] ++ (pkgs.lib).optional (system.isLinux && (compiler.isGhc && (compiler.version).ge "8.2") && (compiler.isGhc && (compiler.version).lt "8.3")) (hsPkgs.compact)) ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) [
65+
(hsPkgs.base16-bytestring)
66+
(hsPkgs.cryptohash-md5)
67+
(hsPkgs.cryptohash-sha1)
68+
(hsPkgs.cryptohash-sha256)
69+
(hsPkgs.cryptohash-sha512)
70+
(hsPkgs.serialise)
71+
]) ++ [
72+
(hsPkgs.lens-family)
73+
(hsPkgs.lens-family-core)
74+
]) ++ (pkgs.lib).optional (compiler.isGhc && (compiler.version).lt "8.4.0" && !flags.profiling) (hsPkgs.ghc-datasize)) ++ (if compiler.isGhcjs && true
75+
then [ (hsPkgs.hashable) ]
76+
else [ (hsPkgs.hashable) (hsPkgs.haskeline) (hsPkgs.pretty-show) ]);
77+
};
78+
exes = {
79+
"hnix" = {
80+
depends = ([
81+
(hsPkgs.aeson)
82+
(hsPkgs.base)
83+
(hsPkgs.bytestring)
84+
(hsPkgs.containers)
85+
(hsPkgs.data-fix)
86+
(hsPkgs.deepseq)
87+
(hsPkgs.exceptions)
88+
(hsPkgs.filepath)
89+
(hsPkgs.hashing)
90+
(hsPkgs.haskeline)
91+
(hsPkgs.hnix)
92+
(hsPkgs.mtl)
93+
(hsPkgs.optparse-applicative)
94+
(hsPkgs.pretty-show)
95+
(hsPkgs.prettyprinter)
96+
(hsPkgs.repline)
97+
(hsPkgs.template-haskell)
98+
(hsPkgs.text)
99+
(hsPkgs.time)
100+
(hsPkgs.transformers)
101+
(hsPkgs.unordered-containers)
102+
] ++ (pkgs.lib).optional (system.isLinux && (compiler.isGhc && (compiler.version).ge "8.2") && (compiler.isGhc && (compiler.version).lt "8.3")) (hsPkgs.compact)) ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) [
103+
(hsPkgs.base16-bytestring)
104+
(hsPkgs.cryptohash-md5)
105+
(hsPkgs.cryptohash-sha1)
106+
(hsPkgs.cryptohash-sha256)
107+
(hsPkgs.cryptohash-sha512)
108+
(hsPkgs.serialise)
109+
];
110+
};
111+
};
112+
tests = {
113+
"hnix-tests" = {
114+
depends = ([
115+
(hsPkgs.Diff)
116+
(hsPkgs.Glob)
117+
(hsPkgs.base)
118+
(hsPkgs.bytestring)
119+
(hsPkgs.containers)
120+
(hsPkgs.data-fix)
121+
(hsPkgs.deepseq)
122+
(hsPkgs.dependent-sum)
123+
(hsPkgs.directory)
124+
(hsPkgs.exceptions)
125+
(hsPkgs.filepath)
126+
(hsPkgs.generic-random)
127+
(hsPkgs.hashing)
128+
(hsPkgs.hedgehog)
129+
(hsPkgs.hnix)
130+
(hsPkgs.interpolate)
131+
(hsPkgs.megaparsec)
132+
(hsPkgs.mtl)
133+
(hsPkgs.optparse-applicative)
134+
(hsPkgs.pretty-show)
135+
(hsPkgs.prettyprinter)
136+
(hsPkgs.process)
137+
(hsPkgs.split)
138+
(hsPkgs.tasty)
139+
(hsPkgs.tasty-hedgehog)
140+
(hsPkgs.tasty-hunit)
141+
(hsPkgs.tasty-quickcheck)
142+
(hsPkgs.tasty-th)
143+
(hsPkgs.template-haskell)
144+
(hsPkgs.text)
145+
(hsPkgs.time)
146+
(hsPkgs.transformers)
147+
(hsPkgs.unix)
148+
(hsPkgs.unordered-containers)
149+
] ++ (pkgs.lib).optional (system.isLinux && (compiler.isGhc && (compiler.version).ge "8.2") && (compiler.isGhc && (compiler.version).lt "8.3")) (hsPkgs.compact)) ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) [
150+
(hsPkgs.base16-bytestring)
151+
(hsPkgs.cryptohash-md5)
152+
(hsPkgs.cryptohash-sha1)
153+
(hsPkgs.cryptohash-sha256)
154+
(hsPkgs.cryptohash-sha512)
155+
(hsPkgs.serialise)
156+
];
157+
build-tools = [ ((hsPkgs.buildPackages).hspec-discover) ];
158+
};
159+
};
160+
benchmarks = {
161+
"hnix-benchmarks" = {
162+
depends = ([
163+
(hsPkgs.base)
164+
(hsPkgs.bytestring)
165+
(hsPkgs.containers)
166+
(hsPkgs.criterion)
167+
(hsPkgs.data-fix)
168+
(hsPkgs.deepseq)
169+
(hsPkgs.exceptions)
170+
(hsPkgs.filepath)
171+
(hsPkgs.hashing)
172+
(hsPkgs.hnix)
173+
(hsPkgs.mtl)
174+
(hsPkgs.optparse-applicative)
175+
(hsPkgs.template-haskell)
176+
(hsPkgs.text)
177+
(hsPkgs.time)
178+
(hsPkgs.transformers)
179+
(hsPkgs.unordered-containers)
180+
] ++ (pkgs.lib).optional (system.isLinux && (compiler.isGhc && (compiler.version).ge "8.2") && (compiler.isGhc && (compiler.version).lt "8.3")) (hsPkgs.compact)) ++ (pkgs.lib).optionals (!(compiler.isGhcjs && true)) [
181+
(hsPkgs.base16-bytestring)
182+
(hsPkgs.cryptohash-md5)
183+
(hsPkgs.cryptohash-sha1)
184+
(hsPkgs.cryptohash-sha256)
185+
(hsPkgs.cryptohash-sha512)
186+
(hsPkgs.serialise)
187+
];
188+
};
189+
};
190+
};
191+
} // {
192+
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
193+
url = "https://github.com/haskell-nix/hnix.git";
194+
rev = "617d0867ab96c8f97b02c4524bd948d9f114005e";
195+
sha256 = "037kxj9wirynmavlp7d0k19a5xrhj117hlh3yia12xj6v828b99z";
196+
});
197+
}

0 commit comments

Comments
 (0)