3
3
# package sets out of this repo. Ideally, this file is only used for
4
4
# fixing things that are broken due to the Nix infrastructure.
5
5
6
- { pkgs , config , ... } :
6
+ { pkgs , lib , config , ... } :
7
7
let
8
8
fromUntil = from : until : patch : { version } :
9
9
if builtins . compareVersions version from >= 0
@@ -35,9 +35,9 @@ in addPackageKeys {
35
35
# These packages have `license: LGPL` in their .cabal file, but
36
36
# do not specify the version. Setting the version here on
37
37
# examination of the license files included in the packages.
38
- packages . hscolour . package . license = pkgs . lib . mkForce "LGPL-2.1-only" ;
39
- packages . cpphs . package . license = pkgs . lib . mkForce "LGPL-2.1-only" ;
40
- packages . polyparse . package . license = pkgs . lib . mkForce "LGPL-2.1-only" ;
38
+ packages . hscolour . package . license = lib . mkForce "LGPL-2.1-only" ;
39
+ packages . cpphs . package . license = lib . mkForce "LGPL-2.1-only" ;
40
+ packages . polyparse . package . license = lib . mkForce "LGPL-2.1-only" ;
41
41
42
42
# These two patches are needed by GHCJS
43
43
packages . Cabal . patches = [
@@ -63,14 +63,14 @@ in addPackageKeys {
63
63
#
64
64
# We now expose genprimopcode and deriveConstants from ghc directly (this is not in line with
65
65
# with upstream ghc) to be able to re-build lib:ghc.
66
- packages . ghc . components . library . build-tools = pkgs . lib . mkForce (
67
- pkgs . lib . optionals ( __compareVersions config . hsPkgs . ghc . identifier . version "9.4.1" > 0 ) [
66
+ packages . ghc . components . library . build-tools = lib . mkForce (
67
+ lib . optionals ( __compareVersions config . hsPkgs . ghc . identifier . version "9.4.1" > 0 ) [
68
68
( config . hsPkgs . buildPackages . alex . components . exes . alex or pkgs . buildPackages . alex )
69
69
( config . hsPkgs . buildPackages . happy . components . exes . happy or pkgs . buildPackages . happy )
70
70
] ) ;
71
71
72
72
# Remove dependency on hsc2hs (hsc2hs should be in ghc derivation)
73
- packages . mintty . components . library . build-tools = pkgs . lib . mkForce [ ] ;
73
+ packages . mintty . components . library . build-tools = lib . mkForce [ ] ;
74
74
75
75
packages . ghc-lib-parser . patches = [
76
76
( fromUntil "8.10.0.0" "9.2" ../overlays/patches/ghc-lib-parser-8.10-global-unique-counters-in-rts.patch )
@@ -86,7 +86,7 @@ in addPackageKeys {
86
86
87
87
# See https://github.com/input-output-hk/haskell.nix/issues/1455
88
88
# This is a work around to make `ghcide` and `haskell-language-server` build with the unboxed tuple patch.
89
- packages . ghcide = pkgs . lib . mkIf ( __elem config . compiler . nix-name [
89
+ packages . ghcide = lib . mkIf ( __elem config . compiler . nix-name [
90
90
# Work out if we have applied the unboxed tupple patch in overlays/bootstrap.nix
91
91
"ghc8101" "ghc8102" "ghc8103" "ghc8104" "ghc8105" "ghc8106" "ghc8107" "ghc810420210212"
92
92
] ) {
@@ -97,7 +97,7 @@ in addPackageKeys {
97
97
( fromUntil "2.2.0.0" "2.3.0.0" ../patches/ghcide-2.2-unboxed-tuple-fix-issue-1455.patch )
98
98
]
99
99
# This is needed for a patch only applied to ghc810420210212
100
- ++ pkgs . lib . optional ( __elem config . compiler . nix-name [
100
+ ++ lib . optional ( __elem config . compiler . nix-name [
101
101
"ghc810420210212"
102
102
] ) ( from "1.7.0.0" ../patches/ghcide-1.7-plutus-ghc.patch ) ;
103
103
flags = {
@@ -119,9 +119,9 @@ in addPackageKeys {
119
119
( fromUntil "0.9.1" "0.9.2" ../patches/languge-c-int128.patch )
120
120
] ;
121
121
122
- packages . discount . components . library . libs = pkgs . lib . mkForce [ pkgs . discount ] ;
122
+ packages . discount . components . library . libs = lib . mkForce [ pkgs . discount ] ;
123
123
124
- packages . llvm-hs . components . library . build-tools = pkgs . lib . mkForce [
124
+ packages . llvm-hs . components . library . build-tools = lib . mkForce [
125
125
( fromUntil "5.0.0" "6" pkgs . llvmPackages_5 . llvm )
126
126
( fromUntil "6.0.0" "7" pkgs . llvmPackages_6 . llvm )
127
127
( fromUntil "7.0.0" "8" pkgs . llvmPackages_7 . llvm )
@@ -185,13 +185,22 @@ in addPackageKeys {
185
185
# https://gitlab.haskell.org/ghc/ghc/-/issues/23392
186
186
# Using -j1 works around the issue.
187
187
packages . gi-gtk . components . library . ghcOptions =
188
- pkgs . lib . optional (
188
+ lib . optional (
189
189
builtins . compareVersions config . compiler . version "9.6.1" >= 0
190
190
&& builtins . compareVersions config . compiler . version "9.9" < 0 ) "-j1" ;
191
191
192
192
# With recent versions of nixpkgs fortify causes musl version of the
193
193
# text package to fail with:
194
194
# error: inlining failed in call to ‘always_inline’ ‘void* memcpy(void*, const void*, size_t)’: target specific option mismatch
195
195
packages . text . components . library . hardeningDisable =
196
- pkgs . lib . optionals pkgs . stdenv . hostPlatform . isMusl [ "fortify" ] ;
196
+ lib . optionals pkgs . stdenv . hostPlatform . isMusl [ "fortify" ] ;
197
+
198
+ # error: use of undeclared identifier 'IP_RECVTOS'
199
+ # for whatever reason nixpkgs 24.11 defines x86_64-darwin
200
+ # to be sdk-10.12.2, and aarch64-darwin to be sdk-11.
201
+ # nixpkgs 25.05 will drop sdk-10.12, and unify aarch64 and x86 at last.
202
+ packages . network . components . library . libs = lib . mkIf ( pkgs . stdenv . hostPlatform . isDarwin && lib . versionOlder pkgs . apple-sdk . version "11" ) [
203
+ pkgs . apple-sdk_11
204
+ ( pkgs . darwinMinVersionHook "11.0" )
205
+ ] ;
197
206
}
0 commit comments