Skip to content

Commit

Permalink
Add cabal2json to static-nix-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Apr 17, 2024
1 parent 8d6e641 commit d58d411
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
10 changes: 7 additions & 3 deletions nix-tools/cabal.project
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
index-state: 2024-03-28T00:00:00Z

with-compiler: ghc-9.2.8

packages: nix-tools

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

test-show-details: direct

Expand All @@ -29,3 +27,9 @@ source-repository-package
location: https://github.com/michaelpj/hackage-db.git
tag: f3b9240212b036391871e4ea09891e91efcea7a1
--sha256: sha256-n0ATmkwtR68E2FuZK3QIQgZirVmWbd21vIQmzhGKsRw=

source-repository-package
type: git
location: https://github.com/andreabedini/Cabal-syntax-json.git
tag: bf97be0038489239a11c61653b55afc77356ac1e
--sha256: sha256-i9TEqQqRqFM07q1Lr6wcMlURhBkhkVxHhP1jQjSE+Yg=
4 changes: 2 additions & 2 deletions nix-tools/nix-tools/nix-tools.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ library
, Stack2nix.External.Resolve
, Stack2nix.Project
, Stack2nix.Stack
build-depends: base >= 4 && <4.18
build-depends: base >= 4 && <4.20
, Cabal >= 3.10.3 && <3.11
, Cabal-syntax >= 3.10 && <3.11
, aeson >= 2.0 && <2.3
Expand All @@ -46,7 +46,7 @@ library
-- Needs https://github.com/input-output-hk/iohk-nix/commit/6a8c29117eff36ce975e02e01efc8b25d93fcb90#diff-6fb0c6517b547a8baf082d5d2d604842
-- to work with the data-dir issues when building components.
-- This commit is included since 0.6.5.
, hnix >= 0.6.5 && <0.17
, hnix >= 0.6.5 && <0.18
, hpack
, http-client
, http-client-tls
Expand Down
7 changes: 5 additions & 2 deletions nix-tools/overlay.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
final: _prev:

let
compiler-nix-name = "ghc8107";
compiler-nix-name = "ghc964";

nix-tools = nix-tools-set {
nix-tools = nix-tools-unchecked;
Expand All @@ -18,7 +18,7 @@ let
src = ./.;

compiler-nix-name = final.lib.mkDefault compiler-nix-name;
compilerSelection = p: p.haskell.compiler;
# compilerSelection = p: p.haskell.compiler;

# tests need to fetch hackage
configureArgs = final.lib.mkDefault "--disable-tests";
Expand Down Expand Up @@ -54,6 +54,9 @@ let

inherit (project.hsPkgs.hpack.components.exes)
hpack;

inherit (project.hsPkgs.Cabal-syntax-json.components.exes)
cabal2json;
};

warning = final.lib.mapAttrs
Expand Down
5 changes: 4 additions & 1 deletion nix-tools/static/project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ let
plan-to-nix.dontStrip = false;
stack-repos.dontStrip = false;
};
packages.cabal-install.components.exes.cabal.dontStrip = false;
packages.hpack.components.exes.hpack.dontStrip = false;
packages.Cabal-syntax-json.components.exes.cabal2json.dontStrip = false;
};


Expand All @@ -58,7 +61,7 @@ let

static-nix-tools-project = pkgs.haskell-nix.project' {

compiler-nix-name = "ghc928";
compiler-nix-name = "ghc964";

src = ../.;

Expand Down
1 change: 1 addition & 0 deletions nix-tools/static/zipped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ let
drvs' = [
hsPkgs.cabal-install.components.exes.cabal
hsPkgs.hpack.components.exes.hpack
hsPkgs.Cabal-syntax-json.components.exes.cabal2json
] ++ strippedNixToolsComponents;
};

Expand Down

0 comments on commit d58d411

Please sign in to comment.