Merge pull request #121970 from cdepillabout/spago-0.20.2

spago: 0.20.1 -> 0.20.2
This commit is contained in:
Dennis Gosnell 2021-05-07 20:05:11 +09:00 committed by GitHub
commit f73c2278d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 38 deletions

View file

@ -657,10 +657,6 @@ self: super: builtins.intersectAttrs super {
spago = spago =
let let
# spago requires an older version of megaparsec, but it appears to work
# fine with newer versions.
spagoWithOverrides = doJailbreak super.spago;
docsSearchApp_0_0_10 = pkgs.fetchurl { docsSearchApp_0_0_10 = pkgs.fetchurl {
url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.10/docs-search-app.js"; url = "https://github.com/purescript/purescript-docs-search/releases/download/v0.0.10/docs-search-app.js";
sha256 = "0m5ah29x290r0zk19hx2wix2djy7bs4plh9kvjz6bs9r45x25pa5"; sha256 = "0m5ah29x290r0zk19hx2wix2djy7bs4plh9kvjz6bs9r45x25pa5";
@ -681,17 +677,8 @@ self: super: builtins.intersectAttrs super {
sha256 = "1hjdprm990vyxz86fgq14ajn0lkams7i00h8k2i2g1a0hjdwppq6"; sha256 = "1hjdprm990vyxz86fgq14ajn0lkams7i00h8k2i2g1a0hjdwppq6";
}; };
spagoFixHpack = overrideCabal spagoWithOverrides (drv: { spagoDocs = overrideCabal super.spago (drv: {
postUnpack = (drv.postUnpack or "") + '' postUnpack = (drv.postUnpack or "") + ''
# The source for spago is pulled directly from GitHub. It uses a
# package.yaml file with hpack, not a .cabal file. In the package.yaml file,
# it uses defaults from the master branch of the hspec repo. It will try to
# fetch these at build-time (but it will fail if running in the sandbox).
#
# The following line modifies the package.yaml to not pull in
# defaults from the hspec repo.
substituteInPlace "$sourceRoot/package.yaml" --replace 'defaults: hspec/hspec@master' ""
# Spago includes the following two files directly into the binary # Spago includes the following two files directly into the binary
# with Template Haskell. They are fetched at build-time from the # with Template Haskell. They are fetched at build-time from the
# `purescript-docs-search` repo above. If they cannot be fetched at # `purescript-docs-search` repo above. If they cannot be fetched at
@ -717,9 +704,8 @@ self: super: builtins.intersectAttrs super {
''; '';
}); });
# Because of the problem above with pulling in hspec defaults to the # Tests require network access.
# package.yaml file, the tests are disabled. spagoWithoutChecks = dontCheck spagoDocs;
spagoWithoutChecks = dontCheck spagoFixHpack;
in in
spagoWithoutChecks; spagoWithoutChecks;

View file

@ -1,37 +1,38 @@
# This has been automatically generated by the script
# ./update.sh. This should not be changed by hand.
{ mkDerivation, aeson, aeson-pretty, ansi-terminal, async-pool { mkDerivation, aeson, aeson-pretty, ansi-terminal, async-pool
, base, bower-json, bytestring, Cabal, containers, cryptonite , base, bower-json, bytestring, containers, cryptonite, dhall
, dhall, directory, either, extra, fetchgit, file-embed, filepath , directory, either, extra, fetchgit, file-embed, filepath, foldl
, foldl, fsnotify, generic-lens, Glob, hpack, hspec, hspec-discover , fsnotify, generic-lens, Glob, hspec, hspec-discover
, hspec-megaparsec, http-client, http-conduit, http-types , hspec-megaparsec, http-client, http-conduit, http-types
, lens-family-core, lib, megaparsec, mtl, network-uri, open-browser , lens-family-core, lib, megaparsec, mtl, network-uri, open-browser
, optparse-applicative, prettyprinter, process, QuickCheck, retry , optparse-applicative, prettyprinter, process, QuickCheck, retry
, rio, rio-orphans, safe, semver-range, stm, stringsearch , rio, rio-orphans, safe, semver-range, stm, stringsearch, tar
, tar, template-haskell, temporary, text, time, transformers , template-haskell, temporary, text, time, transformers, turtle
, turtle, unliftio, unordered-containers, utf8-string, versions , unliftio, unordered-containers, utf8-string, versions, with-utf8
, with-utf8, zlib , zlib
}: }:
mkDerivation { mkDerivation {
pname = "spago"; pname = "spago";
version = "0.20.1"; version = "0.20.2";
src = fetchgit { src = fetchgit {
url = "https://github.com/purescript/spago.git"; url = "https://github.com/purescript/spago.git";
sha256 = "1j2yi6zz9m0k0298wllin39h244v8b2rx87yxxgdbjg77kn96vxg"; sha256 = "11jh3bszvl8zfi4xcabpx43jply28dxdywd6fadxspaa05jdxxn2";
rev = "41ad739614f4f2c2356ac921308f9475a5a918f4"; rev = "0f38c9153e46f30e9d87963e181f5c1a595f4b64";
fetchSubmodules = true; fetchSubmodules = true;
}; };
isLibrary = true; isLibrary = true;
isExecutable = true; isExecutable = true;
libraryHaskellDepends = [ libraryHaskellDepends = [
aeson aeson-pretty ansi-terminal async-pool base bower-json aeson aeson-pretty ansi-terminal async-pool base bower-json
bytestring Cabal containers cryptonite dhall directory either bytestring containers cryptonite dhall directory either file-embed
file-embed filepath foldl fsnotify generic-lens Glob http-client filepath foldl fsnotify generic-lens Glob http-client http-conduit
http-conduit http-types lens-family-core megaparsec mtl network-uri http-types lens-family-core megaparsec mtl network-uri open-browser
open-browser optparse-applicative prettyprinter process retry rio optparse-applicative prettyprinter process retry rio rio-orphans
rio-orphans safe semver-range stm stringsearch tar template-haskell safe semver-range stm stringsearch tar template-haskell temporary
temporary text time transformers turtle unliftio text time transformers turtle unliftio unordered-containers
unordered-containers utf8-string versions with-utf8 zlib utf8-string versions with-utf8 zlib
]; ];
libraryToolDepends = [ hpack ];
executableHaskellDepends = [ executableHaskellDepends = [
ansi-terminal base text turtle with-utf8 ansi-terminal base text turtle with-utf8
]; ];
@ -40,7 +41,6 @@ mkDerivation {
process QuickCheck temporary text turtle versions process QuickCheck temporary text turtle versions
]; ];
testToolDepends = [ hspec-discover ]; testToolDepends = [ hspec-discover ];
prePatch = "hpack";
homepage = "https://github.com/purescript/spago#readme"; homepage = "https://github.com/purescript/spago#readme";
license = lib.licenses.bsd3; license = lib.licenses.bsd3;
} }

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i bash -p cabal2nix curl jq #!nix-shell -i bash -p cabal2nix curl jq haskellPackages.cabal2nix-unstable -I nixpkgs=.
# #
# This script will update the spago derivation to the latest version using # This script will update the spago derivation to the latest version using
# cabal2nix. # cabal2nix.
@ -25,7 +25,10 @@ new_version=$(curl --silent "https://api.github.com/repos/purescript/spago/relea
echo "Updating spago from old version $old_version to new version $new_version." echo "Updating spago from old version $old_version to new version $new_version."
echo "Running cabal2nix and outputting to ${spago_derivation_file}..." echo "Running cabal2nix and outputting to ${spago_derivation_file}..."
cabal2nix --revision "$new_version" "https://github.com/purescript/spago.git" > "$spago_derivation_file" echo "# This has been automatically generated by the script" > "$spago_derivation_file"
echo "# ./update.sh. This should not be changed by hand." >> "$spago_derivation_file"
cabal2nix --revision "$new_version" "https://github.com/purescript/spago.git" >> "$spago_derivation_file"
# TODO: This should ideally also automatically update the docsSearchVersion # TODO: This should ideally also automatically update the docsSearchVersion
# from pkgs/development/haskell/configuration-nix.nix. # from pkgs/development/haskell/configuration-nix.nix.