mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-12 00:47:50 +00:00
Cabal 3.17 deduplicates flattened compiler and linker argument lists, which drops the second -framework from Security/CoreFoundation links. Remove the two token-level deduplications while retaining framework search-directory deduplication and registered framework metadata. Patch the Cabal library in haskell.nix's v2 build tool only for Darwin archive projects. Preserve the tool's existing patches and evalWith variants, and leave native CLI and Linux/Android build tools unchanged.
19 lines
658 B
Nix
19 lines
658 B
Nix
final: prev:
|
|
let
|
|
# Patch the Cabal library linked into the build tool, preserving the fork's
|
|
# existing patches, compiler, and per-evaluation-platform tool variants.
|
|
patchTool = tool:
|
|
(tool.project.appendModule {
|
|
modules = [{
|
|
packages.Cabal.patches = [ ./cabal-hsc2hs-preserve-options.patch ];
|
|
}];
|
|
}).hsPkgs.cabal-install.components.exes.cabal;
|
|
original = prev.haskell-nix.v2-cabal-install;
|
|
in prev.lib.optionalAttrs prev.stdenv.buildPlatform.isDarwin {
|
|
haskell-nix = prev.haskell-nix // {
|
|
v2-cabal-install = patchTool original // {
|
|
evalWith = prev.lib.mapAttrs (_: patchTool) original.evalWith;
|
|
};
|
|
};
|
|
}
|