Skip to content

Commit

Permalink
Compile hoogle with GHC version from the shell (#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack authored Jul 14, 2024
1 parent a6fa8bc commit 9549b8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
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

0 comments on commit 9549b8a

Please sign in to comment.