diff options
author | (cdep)illabout <cdep.illabout@gmail.com> | 2020-02-10 12:54:23 +0900 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2020-02-28 20:31:21 +0100 |
commit | b68c9dda98a2d108464e1e142b0e53ae97df79b5 (patch) | |
tree | deefdec5b0549a9e4e3ff1c1c59f146cae0b1112 /pkgs/development/tools | |
parent | 671db18e2221371e856e659d47842d96191fbbd6 (diff) | |
download | nixlib-b68c9dda98a2d108464e1e142b0e53ae97df79b5.tar nixlib-b68c9dda98a2d108464e1e142b0e53ae97df79b5.tar.gz nixlib-b68c9dda98a2d108464e1e142b0e53ae97df79b5.tar.bz2 nixlib-b68c9dda98a2d108464e1e142b0e53ae97df79b5.tar.lz nixlib-b68c9dda98a2d108464e1e142b0e53ae97df79b5.tar.xz nixlib-b68c9dda98a2d108464e1e142b0e53ae97df79b5.tar.zst nixlib-b68c9dda98a2d108464e1e142b0e53ae97df79b5.zip |
spago: 0.13.1 -> 0.14.0
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/purescript/spago/default.nix | 53 | ||||
-rw-r--r-- | pkgs/development/tools/purescript/spago/spago.nix | 10 | ||||
-rwxr-xr-x | pkgs/development/tools/purescript/spago/update.sh | 7 |
3 files changed, 56 insertions, 14 deletions
diff --git a/pkgs/development/tools/purescript/spago/default.nix b/pkgs/development/tools/purescript/spago/default.nix index 2fc5efedb20b..f5720837d79e 100644 --- a/pkgs/development/tools/purescript/spago/default.nix +++ b/pkgs/development/tools/purescript/spago/default.nix @@ -1,14 +1,53 @@ -{ haskellPackages -, haskell +{ haskell +, haskellPackages , lib +, nodejs +, purescript +, runCommand }: -haskell.lib.justStaticExecutables (haskell.lib.overrideCabal haskellPackages.spago (oldAttrs: { - maintainers = (oldAttrs.maintainers or []) ++ [ - lib.maintainers.cdepillabout - ]; +let + spago = + haskell.lib.justStaticExecutables + (haskell.lib.overrideCabal haskellPackages.spago (oldAttrs: { + maintainers = (oldAttrs.maintainers or []) ++ [ + lib.maintainers.cdepillabout + ]; + })); +in +spago.overrideAttrs (oldAttrs: { passthru = (oldAttrs.passthru or {}) // { updateScript = ./update.sh; + + # 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 = [ + nodejs + purescript + spago + ]; + } + '' + # spago expects HOME to be set because it creates a cache file under + # home. + HOME=$(pwd) + + spago --verbose init + spago --verbose build + spago --verbose test + + touch $out + ''; }; -})) +}) + diff --git a/pkgs/development/tools/purescript/spago/spago.nix b/pkgs/development/tools/purescript/spago/spago.nix index 1a7ec35748ba..adf019eef572 100644 --- a/pkgs/development/tools/purescript/spago/spago.nix +++ b/pkgs/development/tools/purescript/spago/spago.nix @@ -11,11 +11,11 @@ }: mkDerivation { pname = "spago"; - version = "0.13.1"; + version = "0.14.0"; src = fetchgit { - url = "https://github.com/spacchetti/spago.git"; - sha256 = "0l6sy1hz5dbnrjkvb2f44afhd48nwqx5kx1h29ns93xbbd57hci8"; - rev = "b87858609c671d8f3dc78f858ce1d8c492bd1062"; + url = "https://github.com/purescript/spago.git"; + sha256 = "12i1430prqspy73nwfxc17zf51yprhrxxcnhw4rks6jhkgwxf4a4"; + rev = "7a99343e4876a465600eaa64b0697a9f0b2a49a9"; fetchSubmodules = true; }; isLibrary = true; @@ -42,6 +42,6 @@ mkDerivation { ]; testToolDepends = [ hspec-discover ]; prePatch = "hpack"; - homepage = "https://github.com/spacchetti/spago#readme"; + homepage = "https://github.com/purescript/spago#readme"; license = stdenv.lib.licenses.bsd3; } diff --git a/pkgs/development/tools/purescript/spago/update.sh b/pkgs/development/tools/purescript/spago/update.sh index 00c9c6d85f1d..74bc01050662 100755 --- a/pkgs/development/tools/purescript/spago/update.sh +++ b/pkgs/development/tools/purescript/spago/update.sh @@ -20,11 +20,14 @@ spago_derivation_file="${script_dir}/spago.nix" old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$spago_derivation_file")" # This is the latest release version of spago on GitHub. -new_version=$(curl --silent "https://api.github.com/repos/spacchetti/spago/releases" | jq '.[0].tag_name' --raw-output) +new_version=$(curl --silent "https://api.github.com/repos/purescript/spago/releases" | jq '.[0].tag_name' --raw-output) echo "Updating spago from old version $old_version to new version $new_version." echo "Running cabal2nix and outputting to ${spago_derivation_file}..." -cabal2nix --revision "$new_version" "https://github.com/spacchetti/spago.git" > "$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 +# from pkgs/development/haskell/configuration-nix.nix. echo "Finished." |