Skip to content

Commit 4015665

Browse files
spago-legacy: 0.21.0 -> 0.21.1, rename from spago
See purescript/spago-legacy#3. Co-authored-by: Peter Becich <peterbecich@gmail.com>
1 parent 14c85cb commit 4015665

12 files changed

Lines changed: 65 additions & 171 deletions

File tree

pkgs/development/compilers/purescript/purescript/update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ echo
5050
echo "Finished. Make sure you run the following commands to confirm PureScript builds correctly:"
5151
echo ' - `nix build -L -f ./. purescript`'
5252
echo ' - `nix build -L -f ./. purescript.passthru.tests.minimal-module`'
53-
echo ' - `sudo nix build -L -f ./. spago.passthru.tests --option sandbox relaxed`'
53+
echo ' - `sudo nix build -L -f ./. spago-legacy.passthru.tests --option sandbox relaxed`'

pkgs/development/haskell-modules/configuration-common.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,6 @@ with haskellLib;
27692769
let
27702770
# We need to build purescript with these dependencies and thus also its reverse
27712771
# dependencies to avoid version mismatches in their dependency closure.
2772-
# TODO: maybe unify with the spago overlay in configuration-nix.nix?
27732772
purescriptOverlay = self: super: {
27742773
# As of 2021-11-08, the latest release of `language-javascript` is 0.7.1.0,
27752774
# but it has a problem with parsing the `async` keyword. It doesn't allow

pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ extra-packages:
6161
- extensions == 0.1.0.1 # 2025-09-21: needed for Cabal 3.10 (fourmolo/ormolu with ghc 9.8)
6262
- fourmolu == 0.14.0.0 # 2023-11-13: for ghc-lib-parser 9.6 compat
6363
- fourmolu == 0.15.0.0 # 2025-09-21: for ghc-lib-parser 9.8 compat
64-
- fsnotify < 0.4 # 2024-04-22: required by spago-0.21
6564
- fuzzyset == 0.2.4 # 2023-12-20: Needed for building postgrest > 10
6665
- ghc-exactprint == 0.6.* # 2022-12-12: needed for GHC < 9.2
6766
- ghc-exactprint == 1.5.* # 2023-03-30: needed for GHC == 9.2
@@ -116,7 +115,6 @@ extra-packages:
116115
- text-builder < 1 # 2025-08-27: Needed for building postgrest
117116
- text-builder-dev < 0.4 # 2025-08-27: Needed for building postgrest
118117
- text-metrics < 0.3.3 # 2025-02-08: >= 0.3.3 uses GHC2021
119-
- versions < 6 # 2024-04-22: required by spago-0.21
120118
- weeder == 2.3.* # 2022-05-31: preserve for GHC 9.0.2
121119
- weeder == 2.4.* # 2023-02-02: preserve for GHC 9.2.*
122120
# keep-sorted end

pkgs/development/haskell-modules/configuration-nix.nix

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ builtins.intersectAttrs super {
10811081
addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.pango
10821082
);
10831083

1084-
spago =
1084+
spago-legacy =
10851085
let
10861086
docsSearchApp_0_0_10 = pkgs.fetchurl {
10871087
url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.10/docs-search-app.js";
@@ -1103,49 +1103,43 @@ builtins.intersectAttrs super {
11031103
sha256 = "1hjdprm990vyxz86fgq14ajn0lkams7i00h8k2i2g1a0hjdwppq6";
11041104
};
11051105
in
1106-
lib.pipe
1107-
(super.spago.override {
1108-
# base <4.19, text <2.1
1109-
versions = doJailbreak self.versions_5_0_5;
1110-
fsnotify = self.fsnotify_0_3_0_1;
1111-
})
1112-
[
1113-
(overrideCabal (drv: {
1114-
postUnpack = (drv.postUnpack or "") + ''
1115-
# Spago includes the following two files directly into the binary
1116-
# with Template Haskell. They are fetched at build-time from the
1117-
# `purescript-docs-search` repo above. If they cannot be fetched at
1118-
# build-time, they are pulled in from the `templates/` directory in
1119-
# the spago source.
1120-
#
1121-
# However, they are not actually available in the spago source, so they
1122-
# need to fetched with nix and put in the correct place.
1123-
# https://github.com/spacchetti/spago/issues/510
1124-
cp ${docsSearchApp_0_0_10} "$sourceRoot/templates/docs-search-app-0.0.10.js"
1125-
cp ${docsSearchApp_0_0_11} "$sourceRoot/templates/docs-search-app-0.0.11.js"
1126-
cp ${purescriptDocsSearch_0_0_10} "$sourceRoot/templates/purescript-docs-search-0.0.10"
1127-
cp ${purescriptDocsSearch_0_0_11} "$sourceRoot/templates/purescript-docs-search-0.0.11"
1128-
1129-
# For some weird reason, on Darwin, the open(2) call to embed these files
1130-
# requires write permissions. The easiest resolution is just to permit that
1131-
# (doesn't cause any harm on other systems).
1132-
chmod u+w \
1133-
"$sourceRoot/templates/docs-search-app-0.0.10.js" \
1134-
"$sourceRoot/templates/purescript-docs-search-0.0.10" \
1135-
"$sourceRoot/templates/docs-search-app-0.0.11.js" \
1136-
"$sourceRoot/templates/purescript-docs-search-0.0.11"
1137-
'';
1138-
}))
1106+
lib.pipe super.spago-legacy [
1107+
(overrideCabal (drv: {
1108+
postUnpack = (drv.postUnpack or "") + ''
1109+
# Spago includes the following two files directly into the binary
1110+
# with Template Haskell. They are fetched at build-time from the
1111+
# `purescript-docs-search` repo above. If they cannot be fetched at
1112+
# build-time, they are pulled in from the `templates/` directory in
1113+
# the spago source.
1114+
#
1115+
# However, they are not actually available in the spago source, so they
1116+
# need to fetched with nix and put in the correct place.
1117+
# https://github.com/spacchetti/spago/issues/510
1118+
cp ${docsSearchApp_0_0_10} "$sourceRoot/templates/docs-search-app-0.0.10.js"
1119+
cp ${docsSearchApp_0_0_11} "$sourceRoot/templates/docs-search-app-0.0.11.js"
1120+
cp ${purescriptDocsSearch_0_0_10} "$sourceRoot/templates/purescript-docs-search-0.0.10"
1121+
cp ${purescriptDocsSearch_0_0_11} "$sourceRoot/templates/purescript-docs-search-0.0.11"
1122+
1123+
# For some weird reason, on Darwin, the open(2) call to embed these files
1124+
# requires write permissions. The easiest resolution is just to permit that
1125+
# (doesn't cause any harm on other systems).
1126+
chmod u+w \
1127+
"$sourceRoot/templates/docs-search-app-0.0.10.js" \
1128+
"$sourceRoot/templates/purescript-docs-search-0.0.10" \
1129+
"$sourceRoot/templates/docs-search-app-0.0.11.js" \
1130+
"$sourceRoot/templates/purescript-docs-search-0.0.11"
1131+
'';
1132+
}))
11391133

1140-
# Tests require network access.
1141-
dontCheck
1134+
# Tests require network access.
1135+
dontCheck
11421136

1143-
# Overly strict upper bound on text
1144-
doJailbreak
1137+
# Overly strict upper bound on text (<1.3)
1138+
doJailbreak
11451139

1146-
# Generate shell completion for spago
1147-
(self.generateOptparseApplicativeCompletions [ "spago" ])
1148-
];
1140+
# Generate shell completion for spago
1141+
(self.generateOptparseApplicativeCompletions [ "spago" ])
1142+
];
11491143

11501144
# checks SQL statements at compile time, and so requires a running PostgreSQL
11511145
# database to run it's test suite

pkgs/development/haskell-modules/hackage-packages.nix

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

pkgs/development/haskell-modules/non-hackage-packages.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ self: super:
4444
# https://github.com/channable/vaultenv/issues/1
4545
vaultenv = self.callPackage ../tools/haskell/vaultenv { };
4646

47-
# spago is not released to Hackage.
47+
# spago-legacy is not released to Hackage.
4848
# https://github.com/spacchetti/spago/issues/512
49-
spago = self.callPackage ../tools/purescript/spago/spago.nix { };
49+
spago-legacy = self.callPackage ../tools/purescript/spago-legacy/spago-legacy.nix { };
5050

5151
# Unofficial fork until PRs are merged https://github.com/pcapriotti/optparse-applicative/pulls/roberth
5252
# cabal2nix --maintainer roberth https://github.com/hercules-ci/optparse-applicative.git > pkgs/development/misc/haskell/hercules-ci-optparse-applicative.nix

pkgs/development/tools/purescript/spago/default.nix renamed to pkgs/development/tools/purescript/spago-legacy/default.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
lib,
55

66
# The following are only needed for the passthru.tests:
7-
spago,
7+
spago-legacy,
88
cacert,
99
git,
1010
nodejs,
1111
purescript,
1212
runCommand,
1313
}:
1414

15-
lib.pipe haskellPackages.spago [
15+
lib.pipe haskellPackages.spago-legacy [
1616
haskell.lib.compose.justStaticExecutables
1717

1818
(haskell.lib.compose.overrideCabal (oldAttrs: {
19-
changelog = "https://github.com/purescript/spago/releases/tag/${oldAttrs.version}";
19+
changelog = "https://github.com/purescript/spago-legacy/releases/tag/${oldAttrs.version}";
2020

2121
passthru = (oldAttrs.passthru or { }) // {
2222
updateScript = ./update.sh;
@@ -25,18 +25,18 @@ lib.pipe haskellPackages.spago [
2525
# network, so they cannot be run in the nix sandbox. sudo is needed in
2626
# order to change the sandbox option.
2727
#
28-
# $ sudo nix-build -A spago.passthru.tests --option sandbox relaxed
28+
# $ sudo nix-build -A spago-legacy.passthru.tests --option sandbox relaxed
2929
#
3030
tests =
31-
runCommand "spago-tests"
31+
runCommand "spago-legacy-tests"
3232
{
3333
__noChroot = true;
3434
nativeBuildInputs = [
3535
cacert
3636
git
3737
nodejs
3838
purescript
39-
spago
39+
spago-legacy
4040
];
4141
}
4242
''

pkgs/development/tools/purescript/spago/spago.nix renamed to pkgs/development/tools/purescript/spago-legacy/spago-legacy.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262
zlib,
6363
}:
6464
mkDerivation {
65-
pname = "spago";
66-
version = "0.21.0";
65+
pname = "spago-legacy";
66+
version = "0.21.1";
6767
src = fetchgit {
68-
url = "https://github.com/purescript/spago.git";
69-
sha256 = "1v5y15nhw6smnir0y7y854pa70iv8asxsqph2y8rz1c9lkz5d41g";
70-
rev = "c354f4a461f65fcb83aaa843830ea1589f6c7179";
68+
url = "https://github.com/purescript/spago-legacy.git";
69+
sha256 = "18p9cic1y9b2v12np4b5sd82rz5njxh8f1vgqs4gwm6xjccmszmr";
70+
rev = "2790261c28f59940f192c56f3b8245b3ae8b798d";
7171
fetchSubmodules = true;
7272
};
7373
isLibrary = true;
@@ -148,7 +148,7 @@ mkDerivation {
148148
versions
149149
];
150150
testToolDepends = [ hspec-discover ];
151-
homepage = "https://github.com/purescript/spago#readme";
151+
homepage = "https://github.com/purescript/spago-legacy#readme";
152152
license = lib.licenses.bsd3;
153153
mainProgram = "spago";
154154
}
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env nix-shell
22
#!nix-shell -i bash -p curl jq haskellPackages.cabal2nix-unstable.bin nix-prefetch-scripts -I nixpkgs=.
33
#
4-
# This script will update the spago derivation to the latest version using
4+
# This script will update the spago-legacy derivation to the latest version using
55
# cabal2nix.
66
#
7-
# Note that you should always try building spago after updating it here, since
7+
# Note that you should always try building spago-legacy after updating it here, since
88
# some of the overrides in pkgs/development/haskell/configuration-nix.nix may
99
# need to be updated/changed.
1010

@@ -14,26 +14,28 @@ set -eo pipefail
1414
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1515

1616
# Spago derivation created with cabal2nix.
17-
spago_derivation_file="${script_dir}/spago.nix"
17+
spago_derivation_file="${script_dir}/spago-legacy.nix"
1818

19-
# This is the current revision of spago in Nixpkgs.
19+
# This is the current revision of spago-legacy in Nixpkgs.
2020
old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$spago_derivation_file")"
2121

22-
# This is the latest release version of spago on GitHub.
23-
new_version=$(curl --silent "https://api.github.com/repos/purescript/spago/releases" | jq '.[0].tag_name' --raw-output)
22+
# This is the latest release version of spago-legacy on GitHub.
23+
new_version=$(curl --silent "https://api.github.com/repos/purescript/spago-legacy/releases" | jq '.[0].tag_name' --raw-output)
2424

25-
echo "Updating spago from old version $old_version to new version $new_version."
25+
echo "Updating spago-legacy from old version $old_version to new version $new_version."
2626
echo "Running cabal2nix and outputting to ${spago_derivation_file}..."
2727

2828
echo "# This has been automatically generated by the script" > "$spago_derivation_file"
2929
echo "# ./update.sh. This should not be changed by hand." >> "$spago_derivation_file"
3030

31-
cabal2nix --revision "$new_version" "https://github.com/purescript/spago.git" >> "$spago_derivation_file"
31+
cabal2nix --revision "$new_version" "https://github.com/purescript/spago-legacy.git" >> "$spago_derivation_file"
32+
33+
nixfmt "$spago_derivation_file"
3234

3335
# TODO: This should ideally also automatically update the docsSearchVersion
3436
# from pkgs/development/haskell/configuration-nix.nix.
3537

3638
echo
3739
echo "Finished. Make sure you run the following commands to confirm Spago builds correctly:"
38-
echo ' - `nix build -L -f ./. spago`'
39-
echo ' - `sudo nix build -L -f ./. spago.passthru.tests --option sandbox relaxed`'
40+
echo ' - `nix build -L -f ./. spago-legacy`'
41+
echo ' - `sudo nix build -L -f ./. spago-legacy.passthru.tests --option sandbox relaxed`'

pkgs/top-level/aliases.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,6 +2343,7 @@ mapAliases {
23432343
soundOfSorting = sound-of-sorting; # Added 2023-07-07
23442344
SP800-90B_EntropyAssessment = sp800-90b-entropyassessment; # Added on 2024-06-12
23452345
SPAdes = spades; # Added 2024-06-12
2346+
spago = spago-legacy; # Added 2025-09-23
23462347
spark2014 = gnatprove; # Added 2024-02-25
23472348
space-orbit = throw "'space-orbit' has been removed because it is unmaintained; Debian upstream stopped tracking it in 2011."; # Added 2025-06-08
23482349
spatialite_gui = throw "spatialite_gui has been renamed to spatialite-gui"; # Added 2025-01-12

0 commit comments

Comments
 (0)