Skip to content

Commit 29f327d

Browse files
hamishmackAuto Update Bot
and
Auto Update Bot
authored
Add cabal2json to static-nix-tools (#2185)
* Add cabal2json to static-nix-tools * update nix-tools-static.nix --------- Co-authored-by: Auto Update Bot <[email protected]>
1 parent 0a83cdb commit 29f327d

File tree

9 files changed

+69
-52
lines changed

9 files changed

+69
-52
lines changed

ci.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating
22
# on a machine with e.g. no way to build the Darwin IFDs you need!
3-
{ ifdLevel ? 3
3+
{ ifdLevel # This is passed in from flake.nix
44
, checkMaterialization ? false
55
, system ? builtins.currentSystem
66
, evalSystem ? builtins.currentSystem or "x86_64-linux"

flake.nix

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
let
9898
callFlake = import flake-compat;
9999

100+
ifdLevel = 3;
100101
compiler = "ghc928";
101102
config = import ./config.nix;
102103

@@ -208,7 +209,7 @@
208209
stripAttrsForHydra (filterDerivations (
209210
# This is awkward.
210211
import ./ci.nix {
211-
inherit system;
212+
inherit ifdLevel system;
212213
haskellNix = self;
213214
})));
214215

@@ -250,7 +251,9 @@
250251
};
251252
in cf.defaultNix.hydraJobs;
252253
in
253-
self.allJobs.${system} // { nix-tools = nix-tools-hydraJobs.${system} or {}; }
254+
self.allJobs.${system}
255+
// lib.optionalAttrs (ifdLevel > 2)
256+
{ nix-tools = nix-tools-hydraJobs.${system} or {}; }
254257
);
255258

256259
devShells = forEachSystemPkgs (pkgs:
@@ -284,7 +287,7 @@
284287
"ghc921" "ghc922" "ghc923"])
285288
);
286289
}; in with (import nixpkgs { system = "x86_64-linux"; });
287-
traceHydraJobs (lib.recursiveUpdate flake {
290+
traceHydraJobs (lib.recursiveUpdate flake (lib.optionalAttrs (ifdLevel > 2) {
288291
hydraJobs.nix-tools = pkgs.releaseTools.aggregate {
289292
name = "nix-tools";
290293
constituents = [
@@ -299,7 +302,7 @@
299302
(writeText "gitrev" (self.rev or "0000000000000000000000000000000000000000"))
300303
];
301304
};
302-
});
305+
}));
303306

304307
# --- Flake Local Nix Configuration ----------------------------
305308
nixConfig = {

nix-tools-static.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.1.7/"; in {
1+
pkgs: let baseurl = "https://github.com/input-output-hk/haskell.nix/releases/download/nix-tools-0.1.8/"; in {
22
aarch64-darwin = pkgs.fetchurl {
33
name = "aarch64-darwin-nix-tools-static";
44
url = "${baseurl}aarch64-darwin-nix-tools-static.zip";
5-
sha256 = "sha256-f8XbWzHV+yriUvPCxEOt7CuVN5pfE4rbz37OPRG8j7U=";
5+
sha256 = "sha256-du+QOnEkjVQFHiwHr7NGOku/fmvBUCFYRPipzU/MRPc=";
66
};
77
x86_64-darwin = pkgs.fetchurl {
88
name = "x86_64-darwin-nix-tools-static";
99
url = "${baseurl}x86_64-darwin-nix-tools-static.zip";
10-
sha256 = "sha256-kLy9lqJKaISgnfkyiQf7uupRImt3vR/szwXxR+rmDic=";
10+
sha256 = "sha256-I55Mn6iKYxy3uoQp3DyhuJOvUJ+mDP9In9DyuEaw6K4=";
1111
};
1212
aarch64-linux = pkgs.fetchurl {
1313
name = "aarch64-linux-nix-tools-static";
1414
url = "${baseurl}aarch64-linux-nix-tools-static.zip";
15-
sha256 = "sha256-GBq5/JsZamuUZLIXEWxVk5Xnj6eZeQU6vX7ceAcBmAM=";
15+
sha256 = "sha256-kx06o5tzow6PCdkV+mlQW4TQHdkEZGtSvH4sij5ZaYk=";
1616
};
1717
x86_64-linux = pkgs.fetchurl {
1818
name = "x86_64-linux-nix-tools-static";
1919
url = "${baseurl}x86_64-linux-nix-tools-static.zip";
20-
sha256 = "sha256-+tFokn7TNptt2BkROc6QVy2KgWNmPzPVv4tUCm/E7vI=";
20+
sha256 = "sha256-02mBvbW5WT+0fY9n2RIbrNnMwpJIHZ5obgmFXDTz8Ds=";
2121
};
2222
}

nix-tools/cabal.project

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
index-state: 2024-03-28T00:00:00Z
22

3-
with-compiler: ghc-9.2.8
4-
53
packages: nix-tools
64

75
-- haskell.nix expects nix-tools to provide the cabal and hpack executables
86
-- so we put these two packages here, so they will be present even if nix-tools
97
-- dependencies change
10-
extra-packages: cabal-install, hpack
8+
extra-packages: cabal-install, hpack, Cabal-syntax-json
119

1210
test-show-details: direct
1311

@@ -29,3 +27,9 @@ source-repository-package
2927
location: https://github.com/michaelpj/hackage-db.git
3028
tag: f3b9240212b036391871e4ea09891e91efcea7a1
3129
--sha256: sha256-n0ATmkwtR68E2FuZK3QIQgZirVmWbd21vIQmzhGKsRw=
30+
31+
source-repository-package
32+
type: git
33+
location: https://github.com/andreabedini/Cabal-syntax-json.git
34+
tag: bf97be0038489239a11c61653b55afc77356ac1e
35+
--sha256: sha256-i9TEqQqRqFM07q1Lr6wcMlURhBkhkVxHhP1jQjSE+Yg=

nix-tools/flake.lock

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix-tools/nix-tools/nix-tools.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ library
2929
, Stack2nix.External.Resolve
3030
, Stack2nix.Project
3131
, Stack2nix.Stack
32-
build-depends: base >= 4 && <4.18
32+
build-depends: base >= 4 && <4.20
3333
, Cabal >= 3.10.3 && <3.11
3434
, Cabal-syntax >= 3.10 && <3.11
3535
, aeson >= 2.0 && <2.3
@@ -46,7 +46,7 @@ library
4646
-- Needs https://github.com/input-output-hk/iohk-nix/commit/6a8c29117eff36ce975e02e01efc8b25d93fcb90#diff-6fb0c6517b547a8baf082d5d2d604842
4747
-- to work with the data-dir issues when building components.
4848
-- This commit is included since 0.6.5.
49-
, hnix >= 0.6.5 && <0.17
49+
, hnix >= 0.6.5 && <0.18
5050
, hpack
5151
, http-client
5252
, http-client-tls

nix-tools/overlay.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
final: _prev:
22

33
let
4-
compiler-nix-name = "ghc8107";
4+
compiler-nix-name = "ghc964";
55

66
nix-tools = nix-tools-set {
77
nix-tools = nix-tools-unchecked;
@@ -18,7 +18,7 @@ let
1818
src = ./.;
1919

2020
compiler-nix-name = final.lib.mkDefault compiler-nix-name;
21-
compilerSelection = p: p.haskell.compiler;
21+
# compilerSelection = p: p.haskell.compiler;
2222

2323
# tests need to fetch hackage
2424
configureArgs = final.lib.mkDefault "--disable-tests";
@@ -54,6 +54,9 @@ let
5454

5555
inherit (project.hsPkgs.hpack.components.exes)
5656
hpack;
57+
58+
inherit (project.hsPkgs.Cabal-syntax-json.components.exes)
59+
cabal2json;
5760
};
5861

5962
warning = final.lib.mapAttrs

nix-tools/static/project.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ let
4040
plan-to-nix.dontStrip = false;
4141
stack-repos.dontStrip = false;
4242
};
43+
packages.cabal-install.components.exes.cabal.dontStrip = false;
44+
packages.hpack.components.exes.hpack.dontStrip = false;
45+
packages.Cabal-syntax-json.components.exes.cabal2json.dontStrip = false;
4346
};
4447

4548

@@ -53,6 +56,9 @@ let
5356
packages.nix-tools.ghcOptions = [
5457
"-L${pkgs.lib.getLib pkgs.static-gmp}/lib"
5558
];
59+
packages.Cabal-syntax-json.ghcOptions = [
60+
"-L${pkgs.lib.getLib pkgs.static-gmp}/lib"
61+
];
5662
};
5763

5864

nix-tools/static/zipped.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ let
3535
drvs' = [
3636
hsPkgs.cabal-install.components.exes.cabal
3737
hsPkgs.hpack.components.exes.hpack
38+
hsPkgs.Cabal-syntax-json.components.exes.cabal2json
3839
] ++ strippedNixToolsComponents;
3940
};
4041

0 commit comments

Comments
 (0)