diff --git a/default.nix b/default.nix index 64603dd2d..56de4c707 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,7 @@ let "postgrest"; compiler = - "ghc923"; + "ghc924"; # PostgREST source files, filtered based on the rules in the .gitignore files # and file extensions. We want to include as litte as possible, as the files diff --git a/nix/nixpkgs-version.nix b/nix/nixpkgs-version.nix index 668a7fa7a..4e3d404ce 100644 --- a/nix/nixpkgs-version.nix +++ b/nix/nixpkgs-version.nix @@ -1,6 +1,6 @@ # Pinned version of Nixpkgs, generated with postgrest-nixpkgs-upgrade. { - date = "2022-07-14"; - rev = "8eb14e7e79d6c34a9cce146182bfc8c820d527c2"; - tarballHash = "063g7vyyyfhacsi3272k76cq5b03xgl6dza9xzx5g62x6qyzn2i5"; + date = "2022-08-09"; + rev = "9f15d6c3a74d2778c6e1af67947c95f100dc6fd2"; + tarballHash = "14axdmi3kb6rlib39ik42yq907bm66x6vzswm5w1rsnw9vzgm31a"; } diff --git a/nix/patches/default.nix b/nix/patches/default.nix index 552da7ac3..957db93af 100644 --- a/nix/patches/default.nix +++ b/nix/patches/default.nix @@ -18,10 +18,6 @@ done ''; - # See: https://github.com/NixOS/nixpkgs/pull/87879 - nixpkgs-openssl-split-runtime-dependencies-of-static-builds = - ./nixpkgs-openssl-split-runtime-dependencies-of-static-builds.patch; - static-haskell-nix-ncurses = ./static-haskell-nix-ncurses.patch; static-haskell-nix-ghc-bignum = diff --git a/nix/patches/nixpkgs-openssl-split-runtime-dependencies-of-static-builds.patch b/nix/patches/nixpkgs-openssl-split-runtime-dependencies-of-static-builds.patch deleted file mode 100644 index 8ca92e84d..000000000 --- a/nix/patches/nixpkgs-openssl-split-runtime-dependencies-of-static-builds.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix -index db6e0101fec..108527df50c 100644 ---- a/pkgs/development/libraries/openssl/default.nix -+++ b/pkgs/development/libraries/openssl/default.nix -@@ -44,9 +44,21 @@ let - substituteInPlace crypto/async/arch/async_posix.h \ - --replace '!defined(__ANDROID__) && !defined(__OpenBSD__)' \ - '!defined(__ANDROID__) && !defined(__OpenBSD__) && 0' -+ '' + lib.optionalString static -+ # On static builds, the ENGINESDIR will be empty, but its path will be -+ # compiled into the library. In order to minimize the runtime dependencies -+ # of packages that statically link openssl, we move it into the OPENSSLDIR, -+ # which will be separated into the 'etc' output. -+ '' -+ substituteInPlace Configurations/unix-Makefile.tmpl \ -+ --replace 'ENGINESDIR=$(libdir)/engines-{- $sover_dirname -}' \ -+ 'ENGINESDIR=$(OPENSSLDIR)/engines-{- $sover_dirname -}' - ''; - -- outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional withDocs "doc"; -+ outputs = [ "bin" "dev" "out" "man" ] -+ ++ lib.optional withDocs "doc" -+ # Separate output for the runtime dependencies of the static build. -+ ++ lib.optional static "etc"; - setOutputFlags = false; - separateDebugInfo = - !stdenv.hostPlatform.isDarwin && -@@ -102,7 +114,17 @@ let - configureFlags = [ - "shared" # "shared" builds both shared and static libraries - "--libdir=lib" -- "--openssldir=etc/ssl" -+ (if !static then -+ "--openssldir=etc/ssl" -+ else -+ # Separate the OPENSSLDIR into its own output, as its path will be -+ # compiled into 'libcrypto.a'. This makes it a runtime dependency of -+ # any package that statically links openssl, so we want to keep that -+ # output minimal. We need to prepend '/.' to the path in order to make -+ # it appear absolute before variable expansion, the 'prefix' would be -+ # prepended to it otherwise. -+ "--openssldir=/.$(etc)/etc/ssl" -+ ) - ] ++ lib.optionals withCryptodev [ - "-DHAVE_CRYPTODEV" - "-DUSE_CRYPTODEV_DIGESTS" -@@ -140,6 +162,9 @@ let - if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then - rm "$out/lib/"*.a - fi -+ -+ # 'etc' is a separate output on static builds only. -+ etc=$out - '') + lib.optionalString (!stdenv.hostPlatform.isWindows) - # Fix bin/c_rehash's perl interpreter line - # -@@ -161,14 +186,15 @@ let - mv $out/include $dev/ - - # remove dependency on Perl at runtime -- rm -r $out/etc/ssl/misc -+ rm -r $etc/etc/ssl/misc - -- rmdir $out/etc/ssl/{certs,private} -+ rmdir $etc/etc/ssl/{certs,private} - ''; - - postFixup = lib.optionalString (!stdenv.hostPlatform.isWindows) '' -- # Check to make sure the main output doesn't depend on perl -- if grep -r '${buildPackages.perl}' $out; then -+ # Check to make sure the main output and the static runtime dependencies -+ # don't depend on perl -+ if grep -r '${buildPackages.perl}' $out $etc; then - echo "Found an erroneous dependency on perl ^^^" >&2 - exit 1 - fi diff --git a/nix/static-haskell-package.nix b/nix/static-haskell-package.nix index 0317a5160..21b5a9bac 100644 --- a/nix/static-haskell-package.nix +++ b/nix/static-haskell-package.nix @@ -21,13 +21,6 @@ let patches.static-haskell-nix-ghc-bignum ]; - patchedNixpkgs = - patches.applyPatches "patched-nixpkgs" - nixpkgs - [ - patches.nixpkgs-openssl-split-runtime-dependencies-of-static-builds - ]; - extraOverrides = final: prev: rec { @@ -51,14 +44,13 @@ let ) ]; - # Apply our overlay to the given pkgs. + # Apply our overlay to nixpkgs. normalPkgs = - import patchedNixpkgs { inherit overlays; }; + import nixpkgs { inherit overlays; }; defaultCabalPackageVersionComingWithGhc = { - ghc8107 = "Cabal_3_2_1_0"; - ghc923 = "Cabal_3_6_3_0"; + ghc924 = "Cabal_3_6_3_0"; }."${compiler}"; # The static-haskell-nix 'survey' derives a full static set of Haskell