Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile hoogle with GHC version from the shell #2227

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions builder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ let
then pkgs.path
else pkgs.haskell-nix.sources.nixpkgs-2205;
nixpkgsHoogle = import (nixpkgs + /pkgs/development/haskell-modules/hoogle.nix);
in { packages ? [], hoogle ? pkgs.buildPackages.haskell-nix.tool "ghc928" "hoogle" {
inherit evalPackages;
version = "5.0.18.3";
# index-state = pkgs.haskell-nix.internalHackageIndexState;
index-state = "2023-06-05T00:00:00Z";
}
}:
in { packages ? [], hoogle }:
let
haskellPackages = {
# For musl we can use haddock from the buildGHC
Expand Down
14 changes: 5 additions & 9 deletions builder/shell-for.nix
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,17 @@ let
pname = p.identifier.name;
haddockDir = p.haddockDir;
};
in hoogleLocal ({
in hoogleLocal {
packages = map docPackage (haskellLib.flatLibDepends component);

# Need to add hoogle to hsPkgs.
# inherit (hsPkgs) hoogle;
} // (
lib.optionalAttrs (args ? tools && args.tools ? hoogle) {
hoogle = pkgsBuildBuild.haskell-nix.hackage-tool (
haskellLib.versionOrModToMods args.tools.hoogle ++ [{
hoogle = pkgsBuildBuild.haskell-nix.hackage-tool (
lib.optionals (args ? tools && args.tools ? hoogle) (haskellLib.versionOrModToMods args.tools.hoogle)
++ [{
name = "hoogle";
compiler-nix-name = compiler.nix-name;
inherit evalPackages;
}]);
}
));
};

mkDrvArgs = builtins.removeAttrs args ["packages" "components" "additional" "withHoogle" "tools"];
in
Expand Down