Skip to content
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
3 changes: 0 additions & 3 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1333,9 +1333,6 @@ self: super: {
# https://github.com/haskell/hoopl/issues/50
hoopl = dontCheck super.hoopl;

# Generate shell completion for spago
spago = self.generateOptparseApplicativeCompletions [ "spago" ] super.spago;

# https://github.com/DanielG/cabal-helper/pull/123
cabal-helper = doJailbreak super.cabal-helper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ extra-packages:
- attoparsec == 0.13.* # 2022-02-23: Needed to compile elm for now
- base16-bytestring < 1 # required for cabal-install etc.
- basement < 0.0.15 # 2022-08-30: last version to support GHC < 8.10
- bower-json == 1.0.0.1 # 2022-05-21: Needed for spago 0.20.9
- brick == 0.70.* # 2022-08-13: needed by taskell
- brittany == 0.13.1.2 # 2022-09-20: needed for hls on ghc 8.8
- crackNum < 3.0 # 2021-05-21: 3.0 removed the lib which sbv 7.13 uses
Expand Down Expand Up @@ -109,6 +108,8 @@ extra-packages:
- algebraic-graphs < 0.7 # 2023-08-14: Needed for building weeder < 2.6.0
- fuzzyset == 0.2.4 # 2023-12-20: Needed for building postgrest > 10
- ShellCheck == 0.9.0 # 2024-03-21: pinned by haskell-ci
- versions < 6 # 2024-04-22: required by spago-0.21
- fsnotify < 0.4 # 2024-04-22: required by spago-0.21

package-maintainers:
abbradar:
Expand Down
30 changes: 15 additions & 15 deletions pkgs/development/haskell-modules/configuration-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,12 @@ self: super: builtins.intersectAttrs super {
url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.11/purescript-docs-search";
sha256 = "1hjdprm990vyxz86fgq14ajn0lkams7i00h8k2i2g1a0hjdwppq6";
};

spagoDocs = overrideCabal (drv: {
in
lib.pipe (super.spago.override {
versions = self.versions_5_0_5;
fsnotify = self.fsnotify_0_3_0_1;
}) [
(overrideCabal (drv: {
postUnpack = (drv.postUnpack or "") + ''
# Spago includes the following two files directly into the binary
# with Template Haskell. They are fetched at build-time from the
Expand All @@ -875,21 +879,17 @@ self: super: builtins.intersectAttrs super {
"$sourceRoot/templates/docs-search-app-0.0.11.js" \
"$sourceRoot/templates/purescript-docs-search-0.0.11"
'';
}) super.spago;

spagoOldAeson = spagoDocs.overrideScope (hfinal: hprev: {
# spago is not yet updated for aeson 2.0
aeson = hfinal.aeson_1_5_6_0;
# bower-json 1.1.0.0 only supports aeson 2.0, so we pull in the older version here.
bower-json = hprev.bower-json_1_0_0_1;
});
}))

# Tests require network access.
spagoWithoutChecks = dontCheck spagoOldAeson;
in
# spago doesn't currently build with ghc92. Top-level spago is pulled from
# ghc90 and explicitly marked unbroken.
markBroken spagoWithoutChecks;
dontCheck

# Overly strict upper bound on text
doJailbreak

# Generate shell completion for spago
(self.generateOptparseApplicativeCompletions [ "spago" ])
];

# checks SQL statements at compile time, and so requires a running PostgreSQL
# database to run it's test suite
Expand Down
67 changes: 46 additions & 21 deletions pkgs/development/haskell-modules/hackage-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 42 additions & 46 deletions pkgs/development/tools/purescript/spago/default.nix
Original file line number Diff line number Diff line change
@@ -1,61 +1,57 @@
{ haskell
, haskellPackages
, lib

# The following are only needed for the passthru.tests:
, spago
, cacert
, git
, nodejs
, purescript
, runCommand
}:

let
spago =
lib.pipe
haskell.packages.ghc90.spago
[ haskell.lib.compose.justStaticExecutables
(haskell.lib.compose.overrideCabal (oldAttrs: {
changelog = "https://github.com/purescript/spago/releases/tag/${oldAttrs.version}";
}))
];
in
lib.pipe
haskellPackages.spago
[
haskell.lib.compose.justStaticExecutables

spago.overrideAttrs (oldAttrs: {
passthru = (oldAttrs.passthru or {}) // {
updateScript = ./update.sh;
(haskell.lib.compose.overrideCabal (oldAttrs: {
changelog = "https://github.com/purescript/spago/releases/tag/${oldAttrs.version}";

# These tests can be run with the following command. The tests access the
# network, so they cannot be run in the nix sandbox. sudo is needed in
# order to change the sandbox option.
#
# $ sudo nix-build -A spago.passthru.tests --option sandbox relaxed
#
tests =
runCommand
"spago-tests"
{
__noChroot = true;
nativeBuildInputs = [
cacert
git
nodejs
purescript
spago
];
}
''
# spago expects HOME to be set because it creates a cache file under
# home.
HOME=$(pwd)
passthru = (oldAttrs.passthru or {}) // {
updateScript = ./update.sh;

spago --verbose init
spago --verbose build
spago --verbose test
# These tests can be run with the following command. The tests access the
# network, so they cannot be run in the nix sandbox. sudo is needed in
# order to change the sandbox option.
#
# $ sudo nix-build -A spago.passthru.tests --option sandbox relaxed
#
tests =
runCommand
"spago-tests"
{
__noChroot = true;
nativeBuildInputs = [
cacert
git
nodejs
purescript
spago
];
}
''
# spago expects HOME to be set because it creates a cache file under
# home.
HOME=$(pwd)

touch $out
'';
};
meta = (oldAttrs.meta or {}) // {
mainProgram = "spago";
};
})
spago --verbose init
spago --verbose build
spago --verbose test

touch $out
'';
};
}))
]
13 changes: 7 additions & 6 deletions pkgs/development/tools/purescript/spago/spago.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
, optparse-applicative, prettyprinter, process, QuickCheck, retry
, rio, rio-orphans, safe, semver-range, stm, stringsearch, tar
, template-haskell, temporary, text, time, transformers, turtle
, unliftio, unordered-containers, utf8-string, versions, with-utf8
, zlib
, unliftio, unordered-containers, uri-encode, utf8-string, versions
, with-utf8, yaml, zlib
}:
mkDerivation {
pname = "spago";
version = "0.20.9";
version = "0.21.0";
src = fetchgit {
url = "https://github.com/purescript/spago.git";
sha256 = "00vdqg7vaw3d9zwh47886lw9fhhlwjagzhaj3aqz4xm92pjavhih";
rev = "d16d4914200783fbd820ba89dbdf67270454faf5";
sha256 = "1v5y15nhw6smnir0y7y854pa70iv8asxsqph2y8rz1c9lkz5d41g";
rev = "c354f4a461f65fcb83aaa843830ea1589f6c7179";
fetchSubmodules = true;
};
isLibrary = true;
Expand All @@ -31,7 +31,7 @@ mkDerivation {
optparse-applicative prettyprinter process retry rio rio-orphans
safe semver-range stm stringsearch tar template-haskell temporary
text time transformers turtle unliftio unordered-containers
utf8-string versions with-utf8 zlib
uri-encode utf8-string versions with-utf8 yaml zlib
];
executableHaskellDepends = [
ansi-terminal base text turtle with-utf8
Expand All @@ -43,4 +43,5 @@ mkDerivation {
testToolDepends = [ hspec-discover ];
homepage = "https://github.com/purescript/spago#readme";
license = lib.licenses.bsd3;
mainProgram = "spago";
}