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

haskell: Make haskellPackages.callPackage overridable #90271

Draft
wants to merge 16 commits into
base: haskell-updates
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions pkgs/development/haskell-modules/configuration-common.nix
Expand Up @@ -85,6 +85,11 @@ self: super: {
url = "https://github.com/hercules-ci/optparse-applicative/compare/0.15.1...hercules-ci:0.15.1-nixpkgs-compgen.diff";
sha256 = "1bcp6b7gvc8pqbn1n1ybhizkkl5if7hk9ipgl746vk08v0d3xxql";
});
optparse-applicative_0_16_0_0 = appendPatch super.optparse-applicative_0_16_0_0 (pkgs.fetchpatch {
name = "optparse-applicative-0.15.1-hercules-ci-compgen.diff";
url = "https://github.com/hercules-ci/optparse-applicative/compare/0.15.1...hercules-ci:0.15.1-nixpkgs-compgen.diff";
sha256 = "1bcp6b7gvc8pqbn1n1ybhizkkl5if7hk9ipgl746vk08v0d3xxql";
});

# Fix test trying to access /home directory
shell-conduit = overrideCabal super.shell-conduit (drv: {
Expand Down Expand Up @@ -1442,6 +1447,34 @@ self: super: {

autoapply = super.autoapply.override { th-desugar = self.th-desugar_1_11; };

# binary-instances needs the latest version.
time-compat = self.time-compat_1_9_4;

# - Deps are required during the build for testing and also during execution,
# so add them to build input and also wrap the resulting binary so they're in
# PATH.
update-nix-fetchgit = let deps = [ pkgs.git pkgs.nix pkgs.nix-prefetch-git ];
in generateOptparseApplicativeCompletion "update-nix-fetchgit" (overrideCabal
(addTestToolDepends (super.update-nix-fetchgit.overrideScope (self: super: {
optparse-generic = self.optparse-generic_1_4_4;
optparse-applicative = self.optparse-applicative_0_16_0_0;
})) deps) (drv: {
buildTools = drv.buildTools or [ ] ++ [ pkgs.makeWrapper ];
postInstall = drv.postInstall or "" + ''
wrapProgram "$out/bin/update-nix-fetchgit" --prefix 'PATH' ':' "${
pkgs.lib.makeBinPath deps
}"
'';
}));

optparse-generic_1_4_4 = super.optparse-generic_1_4_4.override {
optparse-applicative = self.optparse-applicative_0_16_0_0;
};

# Our quickcheck-instances is too old for the newer binary-instances, but
# quickcheck-instances is only used in the tests of binary-instances.
binary-instances = dontCheck super.binary-instances;

# INSERT NEW OVERRIDES ABOVE THIS LINE
} // (let
inherit (self) hls-ghcide hls-brittany;
Expand Down
Expand Up @@ -69,7 +69,6 @@ self: super: {
integer-logarithms = doJailbreak super.integer-logarithms;
lucid = doJailbreak super.lucid;
parallel = doJailbreak super.parallel;
quickcheck-instances = doJailbreak super.quickcheck-instances;
setlocale = doJailbreak super.setlocale;
split = doJailbreak super.split;
system-fileio = doJailbreak super.system-fileio;
Expand Down