From 051b4799deefa44a0c3aa679f18ac3ef8fd801b5 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 10 Jul 2025 12:32:44 +0200 Subject: [PATCH] chore(deps): update nixpkgs to latest nixpkgs-unstable This allows building TemplateHaskell with GHC 9.6+ via iserv-proxy. --- .github/actionlint.yml | 6 ------ .github/actions/cache-on-main/action.yaml | 1 - flake.lock | 8 ++++---- flake.nix | 2 +- nix/overlays/haskell-packages.nix | 22 ++-------------------- nix/tools/devTools.nix | 2 +- nix/tools/style.nix | 2 +- nix/tools/tests.nix | 3 +-- nix/tools/withTools.nix | 4 ++-- src/PostgREST/Config.hs | 2 +- test/io/conftest.py | 2 +- 11 files changed, 14 insertions(+), 40 deletions(-) delete mode 100644 .github/actionlint.yml diff --git a/.github/actionlint.yml b/.github/actionlint.yml deleted file mode 100644 index 61588b7be..000000000 --- a/.github/actionlint.yml +++ /dev/null @@ -1,6 +0,0 @@ -# TODO: Remove this once a new actionlint release has been cut -# and made its way to us through nixpkgs. -self-hosted-runner: - labels: - - macos-15-intel - - ubuntu-24.04-arm diff --git a/.github/actions/cache-on-main/action.yaml b/.github/actions/cache-on-main/action.yaml index b637b5f05..867ebb2b1 100644 --- a/.github/actions/cache-on-main/action.yaml +++ b/.github/actions/cache-on-main/action.yaml @@ -8,7 +8,6 @@ inputs: required: true save-prs: description: Whether to additionally store the cache in a pull request, too. Should only be used for very small caches. - type: boolean prefix: description: Cache key prefix to be used in both primary key and restore-keys. required: true diff --git a/flake.lock b/flake.lock index e687ae512..22d24b5c0 100644 --- a/flake.lock +++ b/flake.lock @@ -2,16 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1752006229, - "narHash": "sha256-BeuAPwNM2RBc5bvUTb0j4GRs2yBkDeRCw/8Y3v9Xesc=", + "lastModified": 1776329215, + "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c80edd02003fe3d8af527215a3ac069be9cfd47f", + "rev": "b86751bc4085f48661017fa226dee99fab6c651b", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixpkgs-25.05-darwin", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index b7de714e8..cb5d48853 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "REST API for any Postgres database"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin"; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; nixConfig = { diff --git a/nix/overlays/haskell-packages.nix b/nix/overlays/haskell-packages.nix index ead6a60f3..919a19127 100644 --- a/nix/overlays/haskell-packages.nix +++ b/nix/overlays/haskell-packages.nix @@ -49,26 +49,6 @@ let # Before upgrading fuzzyset to 0.3, check: https://github.com/PostgREST/postgrest/issues/3329 fuzzyset = prev.fuzzyset_0_2_4; - # TODO: Remove once available in nixpkgs haskellPackages - configurator-pg = - prev.callHackageDirect - { - pkg = "configurator-pg"; - ver = "0.2.11"; - sha256 = "sha256-mtGtNawDJgz2ZIEVca+IYXVu4oNw9xsfJiYWAqAbbgc="; - } - { }; - - # TODO: Remove once available in nixpkgs haskellPackages - streaming-commons = - prev.callHackageDirect - { - pkg = "streaming-commons"; - ver = "0.2.3.1"; - sha256 = "sha256-Gl2eaJcWe1sxmcE/octWlH9uSnERguf+5H66K4fV87s="; - } - { }; - # Downgrade hasql and related packages while we are still on GHC 9.4 for the static build. hasql = lib.dontCheck (lib.doJailbreak prev.hasql_1_6_4_4); hasql-dynamic-statements = lib.dontCheck prev.hasql-dynamic-statements_0_3_1_5; @@ -77,6 +57,8 @@ let hasql-pool = lib.dontCheck prev.hasql-pool_1_0_1; hasql-transaction = lib.dontCheck prev.hasql-transaction_1_1_0_1; postgresql-binary = lib.dontCheck (lib.doJailbreak prev.postgresql-binary_0_13_1_3); + text-builder = prev.text-builder_0_6_10; + text-builder-dev = prev.text-builder-dev_0_3_10; }; in { diff --git a/nix/tools/devTools.nix b/nix/tools/devTools.nix index a84ffcf36..1fd2be431 100644 --- a/nix/tools/devTools.nix +++ b/nix/tools/devTools.nix @@ -172,7 +172,7 @@ let # The following unsets all GIT_ variables. unset "''${!GIT_@}" - # shellcheck disable=SC2317 + # shellcheck disable=SC2329 function restore () { ref="$(git stash list --format=format:%gD --grep "$1" -n1)" # this will avoid merge conflicts when applying the stash diff --git a/nix/tools/style.nix b/nix/tools/style.nix index d53ce9e2b..f9c92afb3 100644 --- a/nix/tools/style.nix +++ b/nix/tools/style.nix @@ -83,7 +83,7 @@ let # ruff has gaps in scanning for unused code, so we use vulture echo "Scanning python files for unused code..." ${silver-searcher}/bin/ag -l --vimgrep -g '\.l?py$' . \ - | xargs ${python3Packages.vulture}/bin/vulture --exclude docs/conf.py + | xargs ${python3Packages.vulture}/bin/vulture --exclude docs/conf.py --min-confidence 80 echo "Linting python files..." ${ruff}/bin/ruff check . diff --git a/nix/tools/tests.nix b/nix/tools/tests.nix index 4e2bf0803..27b9ad366 100644 --- a/nix/tools/tests.nix +++ b/nix/tools/tests.nix @@ -7,7 +7,6 @@ , glibcLocales ? null , gnugrep , hpc-codecov -, hostPlatform , jq , lib , postgrest @@ -159,7 +158,7 @@ let } ( # required for `hpc markup` in CI; glibcLocales is not available e.g. on Darwin - lib.optionalString (stdenv.isLinux && hostPlatform.libc == "glibc") '' + lib.optionalString (stdenv.isLinux && stdenv.hostPlatform.libc == "glibc") '' export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive" '' + diff --git a/nix/tools/withTools.nix b/nix/tools/withTools.nix index 488bb6a1f..b18b1ad52 100644 --- a/nix/tools/withTools.nix +++ b/nix/tools/withTools.nix @@ -116,7 +116,7 @@ let export PGRST_DB_URI="postgres:///$PGDATABASE?host=$PGREPLICAHOST,$PGHOST" fi - # shellcheck disable=SC2317 + # shellcheck disable=SC2329 stop () { log "Stopping the database cluster..." pg_ctl stop --mode=immediate >> "$setuplog" @@ -329,7 +329,7 @@ let $PGRST_CMD ${legacyConfig} > "$tmpdir"/run.log 2>&1 & pid=$! - # shellcheck disable=SC2317 + # shellcheck disable=SC2329 cleanup() { # Send INT to all postgrest processes. # Workaround to trigger dumping postgrest.prof for postgrest-profiled-run diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs index d18a8da57..611b1ac10 100644 --- a/src/PostgREST/Config.hs +++ b/src/PostgREST/Config.hs @@ -362,7 +362,7 @@ parser optPath env dbSettings roleSettings roleIsolationLvl = | otherwise -> pure $ fromList schemas where schemas = splitOnCommas s - errMsg x = ("db-schemas does not allow schema: '" <> x <> "'") + errMsg x = "db-schemas does not allow schema: '" <> x <> "'" parseSocketFileMode :: C.Key -> C.Parser C.Config FileMode parseSocketFileMode k = diff --git a/test/io/conftest.py b/test/io/conftest.py index 87880724f..b6a068222 100644 --- a/test/io/conftest.py +++ b/test/io/conftest.py @@ -87,7 +87,7 @@ def metapostgrest(): class YamlSnapshotExtension(SingleFileSnapshotExtension): - _file_extension = "yaml" + file_extension = "yaml" @pytest.fixture