Skip to content

Commit

Permalink
Pin index-state used to build hoogle in tests (#2278)
Browse files Browse the repository at this point in the history
* Pin index-state used to build hoogle in tests

See #2277

* Also fix shell-for test

* Bump index-state to 2024-10-26
  • Loading branch information
hamishmack authored Nov 1, 2024
1 parent 9a39281 commit 3a26624
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
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; };
hoogle = { cabalProjectLocal = builtins.readFile ../cabal.project.local; index-state = "2024-10-26T00:00:00Z"; };
};
withHoogle = true;
}).overrideAttrs (_: _: {
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; };
tools.hoogle = { cabalProjectLocal = builtins.readFile ../cabal.project.local; index-state = "2024-10-26T00:00:00Z"; };
withHoogle = true;
};

Expand Down
15 changes: 12 additions & 3 deletions test/shell-for/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ let
packages = ps: with ps; [ pkga pkgb ];
# This adds cabal-install to the shell, which helps tests because
# they use a nix-shell --pure. Normally you would BYO cabal-install.
tools = { cabal = { cabalProjectLocal = builtins.readFile ../cabal.project.local; }; };
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
packageSetupDeps = false;
Expand All @@ -31,7 +34,10 @@ let
packages = ps: with ps; [ pkga ];
# This adds cabal-install to the shell, which helps tests because
# they use a nix-shell --pure. Normally you would BYO cabal-install.
tools = { cabal = { cabalProjectLocal = builtins.readFile ../cabal.project.local; }; };
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
packageSetupDeps = false;
Expand All @@ -43,7 +49,10 @@ let
# packages = ps: with ps; [ pkga pkgb ];
# This adds cabal-install to the shell, which helps tests because
# they use a nix-shell --pure. Normally you would BYO cabal-install.
tools = { cabal = { cabalProjectLocal = builtins.readFile ../cabal.project.local; }; };
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 3a26624

Please sign in to comment.