Skip to content

Commit dc27841

Browse files
authored
Merge pull request #13 from commercialhaskell/b/update-dep-fix
Fix and rerun update-deps
2 parents 2d1386f + f2537f7 commit dc27841

10 files changed

Lines changed: 28 additions & 20 deletions

File tree

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/packages/Cabal-syntax.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ mkDerivation {
77
pname = "Cabal-syntax";
88
version = "3.16.1.0";
99
sha256 = "6bd561449b4d96aca4896e17a34cb504d1b0fd83b338380d131b16b50b36bda7";
10-
revision = "1";
11-
editedCabalFile = "1jh16xcdzbhwhdracim2b234nqg0irdvki1czphg30blgg91hvsj";
10+
revision = "2";
11+
editedCabalFile = "01652fri0f6l24cgsag421ghdbx8p095j1549fi5x9ksgp859kqp";
1212
libraryHaskellDepends = [
1313
array base binary bytestring containers deepseq directory filepath
1414
mtl parsec pretty text time transformers
1515
];
1616
libraryToolDepends = [ alex ];
1717
homepage = "http://www.haskell.org/cabal/";
1818
description = "A library for working with .cabal files";
19-
license = lib.licensesSpdx."BSD-3-Clause";
19+
license = lib.licenses.bsd3;
2020
}

nix/packages/Cabal.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ mkDerivation {
77
pname = "Cabal";
88
version = "3.16.1.0";
99
sha256 = "c6b8a37d21dc67c1c68d36a6258ea529391d4bb8bcc1caebaa9b483d93ef2556";
10+
revision = "1";
11+
editedCabalFile = "1ji7cr3fwis7hlh6jrdj94580z5rrn8jrmrzgia98lc9mcbk71rr";
1012
setupHaskellDepends = [ mtl parsec ];
1113
libraryHaskellDepends = [
1214
array base bytestring Cabal-syntax containers deepseq directory
@@ -15,5 +17,5 @@ mkDerivation {
1517
doCheck = false;
1618
homepage = "http://www.haskell.org/cabal/";
1719
description = "A framework for packaging Haskell software";
18-
license = lib.licensesSpdx."BSD-3-Clause";
20+
license = lib.licenses.bsd3;
1921
}

nix/packages/amazonka-core.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ mkDerivation {
3232
];
3333
homepage = "https://github.com/brendanhay/amazonka";
3434
description = "Core data types and functionality for Amazonka libraries";
35-
license = lib.licensesSpdx."MPL-2.0";
35+
license = lib.licenses.mpl20;
3636
}

nix/packages/amazonka-s3.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ mkDerivation {
2020
];
2121
homepage = "https://github.com/brendanhay/amazonka";
2222
description = "Amazon Simple Storage Service SDK";
23-
license = lib.licensesSpdx."MPL-2.0";
23+
license = lib.licenses.mpl20;
2424
}

nix/packages/amazonka-sso.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ mkDerivation {
2020
];
2121
homepage = "https://github.com/brendanhay/amazonka";
2222
description = "Amazon Single Sign-On SDK";
23-
license = lib.licensesSpdx."MPL-2.0";
23+
license = lib.licenses.mpl20;
2424
}

nix/packages/amazonka-sts.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ mkDerivation {
2020
];
2121
homepage = "https://github.com/brendanhay/amazonka";
2222
description = "Amazon Security Token Service SDK";
23-
license = lib.licensesSpdx."MPL-2.0";
23+
license = lib.licenses.mpl20;
2424
}

nix/packages/amazonka.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ mkDerivation {
2626
];
2727
homepage = "https://github.com/brendanhay/amazonka";
2828
description = "Comprehensive Amazon Web Services SDK";
29-
license = lib.licensesSpdx."MPL-2.0";
29+
license = lib.licenses.mpl20;
3030
}

nix/scripts/update-deps.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,27 @@ echo "=== Fetching LTS and Cabal versions (parallel) ==="
5858

5959
search_result=$(retry gh api "search/commits" \
6060
-X GET \
61-
-f q="repo:NixOS/nixpkgs haskellPackages stackage LTS committer-date:<=$nixpkgs_date_iso" \
61+
-f q="repo:NixOS/nixpkgs \"haskellPackages: stackage LTS\" committer-date:<=$nixpkgs_date_iso" \
6262
-f sort="committer-date" \
6363
-f order="desc" \
6464
-f per_page=1 \
65-
--jq '.items[0].commit.message')
65+
--jq '.items[0].commit.message | split("\n")[0]')
6666

6767
if [[ -z "$search_result" || "$search_result" == "null" ]]; then
6868
echo "Error: Could not find LTS commit" >&2
6969
exit 1
7070
fi
7171

72-
lts_version=$(echo "$search_result" | grep -oP 'LTS \K[0-9]+\.[0-9]+' | tail -1)
72+
# `|| true` prevents set -e from silently killing the subshell when
73+
# grep finds no match — we want the explicit empty-check below to fire.
74+
lts_version=$(echo "$search_result" | grep -oP 'LTS \K[0-9]+\.[0-9]+' | tail -1 || true)
7375
if [[ -z "$lts_version" ]]; then
7476
echo "Error: Could not parse LTS version" >&2
7577
exit 1
7678
fi
7779

78-
echo "$lts_version"
79-
) > "$lts_result" &
80+
echo "$lts_version" > "$lts_result"
81+
) &
8082
lts_pid=$!
8183

8284
# Background job: Get latest Cabal versions from Hackage
@@ -85,8 +87,8 @@ lts_pid=$!
8587
"https://hackage.haskell.org/package/Cabal/preferred" | jq -r '.["normal-version"][0]')
8688
cabal_syntax_ver=$(retry curl -sH "Accept: application/json" \
8789
"https://hackage.haskell.org/package/Cabal-syntax/preferred" | jq -r '.["normal-version"][0]')
88-
echo "$cabal_ver $cabal_syntax_ver"
89-
) > "$cabal_result" &
90+
echo "$cabal_ver $cabal_syntax_ver" > "$cabal_result"
91+
) &
9092
cabal_pid=$!
9193

9294
# Wait for both
@@ -145,9 +147,13 @@ cd nix/packages
145147
gen_pkg() {
146148
local name="$1"
147149
shift
150+
(
151+
set -Eeou pipefail
152+
trap 'rm -f "${name}.nix.tmp"' EXIT # Error cleanup
148153
echo "# Generated by update-deps" > "${name}.nix.tmp"
149154
retry cabal2nix "$@" >> "${name}.nix.tmp"
150155
mv "${name}.nix.tmp" "${name}.nix"
156+
)
151157
echo " ${name}: done"
152158
}
153159

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DO NOT EDIT SNAPSHOT. It is generated from `just update-deps`.
2-
snapshot: lts-24.29
2+
snapshot: lts-24.38
33

44
extra-deps:
55
# Not in snapshot.

0 commit comments

Comments
 (0)