Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade nixpkgs #2479

Merged
merged 10 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ let
allOverlays.build-toolbox
allOverlays.checked-shell-script
allOverlays.gitignore
allOverlays.postgis
allOverlays.postgresql-default
allOverlays.postgresql-legacy
allOverlays.postgresql-future
Expand Down
6 changes: 3 additions & 3 deletions nix/nixpkgs-version.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pinned version of Nixpkgs, generated with postgrest-nixpkgs-upgrade.
{
date = "2022-08-09";
rev = "9f15d6c3a74d2778c6e1af67947c95f100dc6fd2";
tarballHash = "14axdmi3kb6rlib39ik42yq907bm66x6vzswm5w1rsnw9vzgm31a";
date = "2022-09-30";
rev = "8ba120420fbdd9bd35b3a5366fa0206d8c99ade3";
tarballHash = "0hfaagh0jnkk85gyj07y3daszfbz8mlafrn3wc3z9875f36810xi";
}
4 changes: 2 additions & 2 deletions nix/overlays/checked-shell-script/checked-shell-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# directly, or use the .bin attribute to get the script in a bin/ directory,
# to be used in a path for example.
{ argbash
, bash_5
, bash
, coreutils
, git
, lib
Expand Down Expand Up @@ -77,7 +77,7 @@ let

text =
''
#!${bash_5}/bin/bash
#!${bash}/bin/bash
source ${argsParser}
set -euo pipefail
''
Expand Down
1 change: 1 addition & 0 deletions nix/overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
checked-shell-script = import ./checked-shell-script;
gitignore = import ./gitignore.nix;
haskell-packages = import ./haskell-packages.nix;
postgis = import ./postgis.nix;
postgresql-default = import ./postgresql-default.nix;
postgresql-legacy = import ./postgresql-legacy.nix;
postgresql-future = import ./postgresql-future.nix;
Expand Down
45 changes: 6 additions & 39 deletions nix/overlays/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,49 +30,16 @@ let
# update-nix-fetchgit nix/overlays/haskell-packages.nix

hashtables = lib.dontCheck prev.hashtables_1_3;
hasql = lib.dontCheck prev.hasql_1_6_1_3;
hasql-dynamic-statements = lib.dontCheck prev.hasql-dynamic-statements_0_3_1_2;
hasql-pool = lib.dontCheck prev.hasql-pool_0_8_0_3;
hasql-transaction = lib.dontCheck prev.hasql-transaction_1_0_1_2;
isomorphism-class = lib.unmarkBroken prev.isomorphism-class;
lens = lib.dontCheck prev.lens_5_2;
postgresql-binary = lib.dontCheck prev.postgresql-binary_0_13;
text-builder = lib.dontCheck prev.text-builder_0_6_7;
text-builder-dev = lib.dontCheck prev.text-builder-dev_0_3_3;

postgresql-binary = lib.dontCheck
(prev.callHackageDirect
{
pkg = "postgresql-binary";
ver = "0.12.5";
sha256 = "1vk97lw25i7d0pvjzd7s3m13nya9ycnrjr8y4qhw2jgjnvkblnzv";
}
{ });

hasql = lib.dontCheck
(prev.callHackageDirect
{
pkg = "hasql";
ver = "1.6.1.1";
sha256 = "1sv0500dvfln9ljxkd2jrfl9nbpkax7z5b8zjy9yjps1r6s1cmj0";
}
{ });

hasql-dynamic-statements = lib.dontCheck prev.hasql-dynamic-statements_0_3_1_2;
hasql-transaction = lib.dontCheck prev.hasql-transaction_1_0_1_2;

hasql-notifications = lib.dontCheck
(prev.callHackageDirect
{
pkg = "hasql-notifications";
ver = "0.2.0.3";
sha256 = "1v44fp03685ngs1l9a7ihkfg5zgvh49k7ym9sh70wjsqql80dhf7";
}
{ });

hasql-pool = lib.dontCheck
(prev.callHackageDirect
{
pkg = "hasql-pool";
ver = "0.8.0.2";
sha256 = "0a646w7m1p430hp52q8d52sgd14zcyrjvflmw7qbak565jmksqgl";
}
{ });

postgresql-libpq = lib.dontCheck
(prev.callCabal2nix "postgresql-libpq"
(super.fetchFromGitHub {
Expand Down
27 changes: 27 additions & 0 deletions nix/overlays/postgis.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
final: prev:
let
postgis_3_2_3 = rec {
version = "3.2.3";
src = final.fetchurl {
url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz";
sha256 = "sha256-G02LXHVuWrpZ77wYM7Iu/k1lYneO7KVvpJf+susTZow=";
};
};
in
{
postgresql_11 = prev.postgresql_11.override { this = final.postgresql_11; } // {
pkgs = prev.postgresql_11.pkgs // {
postgis = prev.postgresql_11.pkgs.postgis.overrideAttrs (_: postgis_3_2_3);
};
};
postgresql_10 = prev.postgresql_10.override { this = final.postgresql_11; } // {
pkgs = prev.postgresql_10.pkgs // {
postgis = prev.postgresql_10.pkgs.postgis.overrideAttrs (_: postgis_3_2_3);
};
};
postgresql_9_6 = prev.postgresql_9_6.override { this = final.postgresql_11; } // {
pkgs = prev.postgresql_9_6.pkgs // {
postgis = prev.postgresql_9_6.pkgs.postgis.overrideAttrs (_: postgis_3_2_3);
};
};
}
2 changes: 2 additions & 0 deletions nix/patches/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
./static-haskell-nix-ncurses.patch;
static-haskell-nix-ghc-bignum =
./static-haskell-nix-ghc-bignum.patch;
static-haskell-nix-openssl =
./static-haskell-nix-openssl.patch;
}
12 changes: 12 additions & 0 deletions nix/patches/static-haskell-nix-openssl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/survey/default.nix b/survey/default.nix
index cf1bd31..9d34753 100644
--- a/survey/default.nix
+++ b/survey/default.nix
@@ -736,6 +736,7 @@ let
openblas = previous.openblas.override { enableStatic = true; };

openssl = previous.openssl.override { static = true; };
+ openssl_1_1 = previous.openssl_1_1.override { static = true; };

libsass = previous.libsass.overrideAttrs (old: { dontDisableStatic = true; });

1 change: 1 addition & 0 deletions nix/static-haskell-package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ let
[
patches.static-haskell-nix-ncurses
patches.static-haskell-nix-ghc-bignum
patches.static-haskell-nix-openssl
];

extraOverrides =
Expand Down
3 changes: 2 additions & 1 deletion nix/tools/nixpkgsTools.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ buildToolbox
, checkedShellScript
, coreutils
, curl
, jq
, nix
Expand Down Expand Up @@ -33,7 +34,7 @@ let
commitHash="$(${curl}/bin/curl "${refUrl}" -H "${githubV3Header}" | ${jq}/bin/jq -r .object.sha)"
tarballUrl="${tarballUrlBase}$commitHash.tar.gz"
tarballHash="$(${nix}/bin/nix-prefetch-url --unpack "$tarballUrl")"
currentDate="$(date --iso)"
currentDate="$(${coreutils}/bin/date --iso)"

cat > nix/nixpkgs-version.nix << EOF
# Pinned version of Nixpkgs, generated with ${name}.
Expand Down
2 changes: 1 addition & 1 deletion nix/tools/tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ let
python3.withPackages (ps: [
ps.pyjwt
ps.pytest
ps.pytest_xdist
ps.pytest-xdist
ps.pyyaml
ps.requests
ps.requests-unixsocket
Expand Down
6 changes: 3 additions & 3 deletions postgrest.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ library
, insert-ordered-containers >= 0.2.2 && < 0.3
, interpolatedstring-perl6 >= 1 && < 1.1
, jose >= 0.8.5.1 && < 0.11
, lens >= 4.14 && < 5.2
, lens >= 4.14 && < 5.3
, lens-aeson >= 1.0.1 && < 1.2
, mtl >= 2.2.2 && < 2.3
, network >= 2.6 && < 3.2
Expand Down Expand Up @@ -234,7 +234,7 @@ test-suite spec
, hspec-wai >= 0.10 && < 0.12
, hspec-wai-json >= 0.10 && < 0.12
, http-types >= 0.12.3 && < 0.13
, lens >= 4.14 && < 5.2
, lens >= 4.14 && < 5.3
, lens-aeson >= 1.0.1 && < 1.2
, monad-control >= 1.0.1 && < 1.1
, postgrest
Expand Down Expand Up @@ -277,7 +277,7 @@ test-suite querycost
, hspec-wai >= 0.10 && < 0.12
, hspec-wai-json >= 0.10 && < 0.12
, http-types >= 0.12.3 && < 0.13
, lens >= 4.14 && < 5.2
, lens >= 4.14 && < 5.3
, lens-aeson >= 1.0.1 && < 1.2
, postgrest
, process >= 1.4.2 && < 1.7
Expand Down