Skip to content

Commit

Permalink
haskellPackages.amazonka{,-*}: build with latest source from github
Browse files Browse the repository at this point in the history
The current hackage version is outdated, but there is working unreleased source code on github. Once brendanhay/amazonka#1001 is completed, these patches can be removed
  • Loading branch information
mpscholten committed Jan 27, 2025
1 parent 29f311f commit c305014
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3114,3 +3114,36 @@ in
];
gogol = assert super.gogol.version == "0.5.0"; setGogolSourceRoot "lib/gogol" super.gogol;
} // gogolServiceOverrides)

# Amazonka Packages
# 2025-01-24: use latest source files from github, as the hackage release is outdated, https://github.com/brendanhay/amazonka/issues/1001
// (
let
amazonkaSrc = pkgs.fetchFromGitHub {
owner = "brendanhay";
repo = "amazonka";
rev = "f3a7fca02fdbb832cc348e991983b1465225d50c";
sha256 = "sha256-u+R+4WeCd16X8H2dkDHzD3nOLsvsTB0lLNUsbRT23aE=";
};
setAmazonkaSourceRoot =
dir: drv:
(overrideCabal (drv: {
src = amazonkaSrc;
postUnpack = drv.postUnpack or "" + ''
sourceRoot="$sourceRoot/${dir}"
'';
}) drv);
isAmazonkaService = name: lib.hasPrefix "amazonka-" name && name != "amazonka-test";
amazonkaServices = lib.filter isAmazonkaService (lib.attrNames super);
amazonkaServiceOverrides = (lib.genAttrs amazonkaServices (name: lib.pipe super.${name} [(setAmazonkaSourceRoot "lib/services/${name}") doJailbreak]));
in
amazonkaServiceOverrides // {
amazonka-core = assert super.amazonka-core.version == "2.0"; lib.pipe
super.amazonka-core
[
(setAmazonkaSourceRoot "lib/amazonka-core")
(addBuildDepends [ self.microlens self.microlens-contra self.microlens-pro ])
(overrideSrc { version = "2.0"; src = amazonkaSrc; })
];
amazonka = assert super.amazonka.version == "2.0"; setAmazonkaSourceRoot "lib/amazonka" (doJailbreak super.amazonka);
})

0 comments on commit c305014

Please sign in to comment.