on iko/ghcjs-patch-master help sign in
Update nixpkgs pins (#477)

This change updates the pins for nixpkgs to the latest upstream nixpkgs-19.*-darwin branches. It also moves the remaining fixes from the haskell-nix/channels/nixpkgs-19.*-darwin branches into overlays in haskell.nix.

commit642636b47b9bce32d68554e9a935eff120fd95a1 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateTue 10 Mar 2020, 14:53 (7 years ago) parent0448544
4 files changed+61−12
nixpkgs/github.json+4−4 nixpkgs/release-19.03.json+4−4 nixpkgs/release-19.09.json+4−4 overlays/release-19.03.nix+49
nixpkgs/github.json+4−4
@@ -1,7 +1,7 @@
11{
2− "url": "https://github.com/input-output-hk/nixpkgs",
3− "rev": "8215f2ee01c56a764416f703c66767404a321d92",
4− "date": "2020-01-25T20:38:55+13:00",
5− "sha256": "0cdmpwpi19354hqvph7mnxrdbphina1vg61fk487i9559bsv545m",
2+ "url": "https://github.com/NixOS/nixpkgs",
3+ "rev": "a81842b6994ce710ebad13303fde29438f610e8c",
4+ "date": "2020-03-07T09:04:39+01:00",
5+ "sha256": "0ch8mnx4iicsh8j6a2a6sgdshbgn6wxhzgf35pnq72avc9pdf2xi",
66 "fetchSubmodules": false
77}
nixpkgs/release-19.03.json+4−4
@@ -1,7 +1,7 @@
11{
2− "url": "https://github.com/input-output-hk/nixpkgs",
3− "rev": "a8f81dc037a5977414a356dd068f2621b3c89b60",
4− "date": "2019-10-17T21:54:56+08:00",
5− "sha256": "01z13axll5g5yl00lz9adr2jw2bs12g9skhbb1vxy8p7fjjbhhhm",
2+ "url": "https://github.com/NixOS/nixpkgs",
3+ "rev": "34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59",
4+ "date": "2020-02-10T19:09:03-05:00",
5+ "sha256": "11z6ajj108fy2q5g8y4higlcaqncrbjm3dnv17pvif6avagw4mcb",
66 "fetchSubmodules": false
77}
nixpkgs/release-19.09.json+4−4
@@ -1,7 +1,7 @@
11{
2− "url": "https://github.com/input-output-hk/nixpkgs",
3− "rev": "8215f2ee01c56a764416f703c66767404a321d92",
4− "date": "2020-01-25T20:38:55+13:00",
5− "sha256": "0cdmpwpi19354hqvph7mnxrdbphina1vg61fk487i9559bsv545m",
2+ "url": "https://github.com/NixOS/nixpkgs",
3+ "rev": "a81842b6994ce710ebad13303fde29438f610e8c",
4+ "date": "2020-03-07T09:04:39+01:00",
5+ "sha256": "0ch8mnx4iicsh8j6a2a6sgdshbgn6wxhzgf35pnq72avc9pdf2xi",
66 "fetchSubmodules": false
77}
overlays/release-19.03.nix+49
@@ -12,4 +12,53 @@ self: super: super.lib.optionalAttrs (super.lib.versions.majorMinor super.lib.ve
1212 export TMPDIR=/tmp
1313 '';
1414 });
15+ # Avoid dependency on perl for windows as it fails to build.
16+ openssl = if self.stdenv.hostPlatform.isWindows
17+ then let static = false; # TODO check that it is ok to assume this (or find a way to detect without instanciating perl)
18+ in super.openssl.overrideAttrs (attrs: {
19+ # This is the `postInstall` from 19.03 nixpkgs but with the line
20+ # substituteInPlace $out/bin/c_rehash --replace ${buildPackages.perl} ${perl}
21+ # removed (as including it requires perl to build).
22+ # (code is copied here because modifying `attrs.postInstall` would still
23+ # introducing the same dependency)
24+ postInstall = self.stdenv.lib.optionalString (!static) ''
25+ # If we're building dynamic libraries, then don't install static
26+ # libraries.
27+ if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
28+ rm "$out/lib/"*.a
29+ fi
30+
31+ '' +
32+ ''
33+ mkdir -p $bin
34+ mv $out/bin $bin/
35+
36+ mkdir $dev
37+ mv $out/include $dev/
38+
39+ # remove dependency on Perl at runtime
40+ rm -r $out/etc/ssl/misc
41+
42+ rmdir $out/etc/ssl/{certs,private}
43+ '';
44+ # Skip this step on windows as it checks for references to buildPackages.perl
45+ # and we are keeping them.
46+ postFixup = "";
47+ })
48+ else super.openssl;
49+ winePackages = super.winePackages // {
50+ minimal = super.winePackages.minimal.overrideAttrs (oldAttrs: {
51+ # Needed for CFNotificationCenterAddObserver symbols.
52+ buildInputs = oldAttrs.buildInputs ++ self.lib.optional self.stdenv.isDarwin
53+ self.buildPackages.darwin.cf-private;
54+ # the relevant check in configure.ac will fail under nix as we are not
55+ # using the system supplied compiler tools. We will subsequently *not*
56+ # pass `-mmacosx-version-min` in the LDFLAGS, and end up with a linked
57+ # binary against 10.14 which *does* contain a __DATA,__dyld section and
58+ # then horribly fail to run on Mojave.
59+ postConfigure = self.lib.optional (self.stdenv.hostPlatform.isDarwin) ''
60+ sed -i 's|-nostartfiles -nodefaultlibs|-nostartfiles -nodefaultlibs -mmacosx-version-min=10.7|g' loader/Makefile
61+ '';
62+ });
63+ };
1564}