Skip to content

Commit

Permalink
Add hackage-quirk for #2277
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Nov 3, 2024
1 parent 57f689e commit 2a460e6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
8 changes: 8 additions & 0 deletions modules/hackage-quirks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ in [
{ _file = "haskell.nix/overlays/hackage-quirks.nix#${n}"; } //
lib.mkIf (n == config.name) v) {

# See https://github.com/input-output-hk/haskell.nix/issues/2277
hoogle = {
cabalProject = ''
packages: .
constraints: data-default-class >=0.2.0.0
'';
};

lsp-test = {
cabalProject = ''
packages: .
Expand Down
2 changes: 1 addition & 1 deletion test/cabal-simple/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ in recurseIntoAttrs {
test-shell = (project.shellFor {
tools = {
cabal = { cabalProjectLocal = builtins.readFile ../cabal.project.local; };
hoogle = { cabalProjectLocal = builtins.readFile ../cabal.project.local; index-state = "2024-10-26T00:00:00Z"; };
hoogle = { cabalProjectLocal = builtins.readFile ../cabal.project.local; };
};
withHoogle = true;
}).overrideAttrs (_: _: {
Expand Down
2 changes: 1 addition & 1 deletion test/cabal.project.local
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repository head.hackage.ghc.haskell.org
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
--sha256: sha256-3sLKfBBTFmzRWgGpPcNBaMZ9HXw6xTIzlKvopQxA2LM=
--sha256: sha256-kFayk9sOpeopLOXQG8yyTqRwEBLKsQOR+6efzbm6YxE=

repository ghcjs-overlay
url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b
Expand Down
2 changes: 1 addition & 1 deletion test/shell-for-setup-deps/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let
};

env = project.shellFor {
tools.hoogle = { cabalProjectLocal = builtins.readFile ../cabal.project.local; index-state = "2024-10-26T00:00:00Z"; };
tools.hoogle = { cabalProjectLocal = builtins.readFile ../cabal.project.local; };
withHoogle = true;
};

Expand Down
3 changes: 0 additions & 3 deletions test/shell-for/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ let
# they use a nix-shell --pure. Normally you would BYO cabal-install.
tools = {
cabal.cabalProjectLocal = builtins.readFile ../cabal.project.local;
hoogle.index-state = "2024-10-26T00:00:00Z";
};
exactDeps = true;
# Avoid duplicate package issues when runghc looks for packages
Expand All @@ -36,7 +35,6 @@ let
# they use a nix-shell --pure. Normally you would BYO cabal-install.
tools = {
cabal.cabalProjectLocal = builtins.readFile ../cabal.project.local;
hoogle.index-state = "2024-10-26T00:00:00Z";
};
exactDeps = true;
# Avoid duplicate package issues when runghc looks for packages
Expand All @@ -51,7 +49,6 @@ let
# they use a nix-shell --pure. Normally you would BYO cabal-install.
tools = {
cabal.cabalProjectLocal = builtins.readFile ../cabal.project.local;
hoogle.index-state = "2024-10-26T00:00:00Z";
};
# Avoid duplicate package issues when runghc looks for packages
packageSetupDeps = false;
Expand Down

0 comments on commit 2a460e6

Please sign in to comment.