From 8ac14447ef85236f68bf8a8b8cc8d1f3052f6224 Mon Sep 17 00:00:00 2001 From: monacoremo <59358383+monacoremo@users.noreply.github.com> Date: Fri, 1 Oct 2021 16:04:16 +0200 Subject: [PATCH] nix: Update nixpkgs to latest unstable version --- default.nix | 2 +- nix/nixpkgs-version.nix | 6 +++--- nix/overlays/postgresql-future.nix | 26 ++++++++++++++------------ nix/static-haskell-package.nix | 15 ++++++++++++++- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/default.nix b/default.nix index a4bbf62f1..ec1224b75 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,7 @@ let "postgrest"; compiler = - "ghc8104"; + "ghc8107"; # 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 4a32003de..d291216e4 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 = "2021-07-17"; - rev = "d00b5a5fa6fe8bdf7005abb06c46ae0245aec8b5"; - tarballHash = "08497wbpnf3w5dalcasqzymw3fmcn8qrnbkf8rxxwwvyjdnczxdv"; + date = "2021-10-31"; + rev = "9303cc044586dd40599233454f1fd79176584c0f"; + tarballHash = "0bgdk4zw9m42i3cva55a2bp2z16kd6xchz08vl0zg8d0mr3kk0q3"; } diff --git a/nix/overlays/postgresql-future.nix b/nix/overlays/postgresql-future.nix index f6d93db7c..d9b480a11 100644 --- a/nix/overlays/postgresql-future.nix +++ b/nix/overlays/postgresql-future.nix @@ -2,16 +2,18 @@ self: super: # Overlay that adds future versions of PostgreSQL that are supported by # PostgREST. { - postgresql_14 = - let - rev = "76b1e16c6659ccef7187ca69b287525fea133244"; - tarballHash = "1vsahpcx80k2bgslspb0sa6j4bmhdx77sw6la455drqcrqhdqj6a"; - - pinnedPkgs = - builtins.fetchTarball { - url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; - sha256 = tarballHash; - }; - in - (import pinnedPkgs { }).pkgs.postgresql_14; + ## Example for including a postgresql version from a specific nixpks commit: + ## + # postgresql_14 = + # let + # rev = "76b1e16c6659ccef7187ca69b287525fea133244"; + # tarballHash = "1vsahpcx80k2bgslspb0sa6j4bmhdx77sw6la455drqcrqhdqj6a"; + # + # pinnedPkgs = + # builtins.fetchTarball { + # url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; + # sha256 = tarballHash; + # }; + # in + # (import pinnedPkgs { }).pkgs.postgresql_14; } diff --git a/nix/static-haskell-package.nix b/nix/static-haskell-package.nix index 51f5f90d0..57d5e6a1f 100644 --- a/nix/static-haskell-package.nix +++ b/nix/static-haskell-package.nix @@ -39,16 +39,29 @@ let overlays = [ + allOverlays.postgresql-future + allOverlays.postgresql-default (allOverlays.haskell-packages { inherit compiler extraOverrides; }) + # Disable failing tests for postgresql on musl that should have no impact + # on the libpq that we need (collate.icu.utf8 and foreign regression + # tests) + (self: super: + { postgresql = super.postgresql.overrideAttrs (_: { doCheck = false; }); } + ) ]; # Apply our overlay to the given pkgs. normalPkgs = import patchedNixpkgs { inherit overlays; }; + defaultCabalPackageVersionComingWithGhc = + { + ghc8107 = "Cabal_3_2_1_0"; + }."${compiler}"; + # The static-haskell-nix 'survey' derives a full static set of Haskell # packages, applying fixes where necessary. survey = - import "${patched-static-haskell-nix}/survey" { inherit normalPkgs compiler; }; + import "${patched-static-haskell-nix}/survey" { inherit normalPkgs compiler defaultCabalPackageVersionComingWithGhc; }; in survey.haskellPackages."${name}"