diff options
Diffstat (limited to 'pkgs/development/tools/purescript')
-rw-r--r-- | pkgs/development/tools/purescript/spago/default.nix | 88 | ||||
-rw-r--r-- | pkgs/development/tools/purescript/spago/spago.nix | 13 |
2 files changed, 49 insertions, 52 deletions
diff --git a/pkgs/development/tools/purescript/spago/default.nix b/pkgs/development/tools/purescript/spago/default.nix index 82d3be2fd4691..b9d97c351b6d7 100644 --- a/pkgs/development/tools/purescript/spago/default.nix +++ b/pkgs/development/tools/purescript/spago/default.nix @@ -1,7 +1,9 @@ { haskell +, haskellPackages , lib # The following are only needed for the passthru.tests: +, spago , cacert , git , nodejs @@ -9,53 +11,47 @@ , 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 + ''; + }; + })) + ] diff --git a/pkgs/development/tools/purescript/spago/spago.nix b/pkgs/development/tools/purescript/spago/spago.nix index e3636e16f58cf..d0455081111fa 100644 --- a/pkgs/development/tools/purescript/spago/spago.nix +++ b/pkgs/development/tools/purescript/spago/spago.nix @@ -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; @@ -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 @@ -43,4 +43,5 @@ mkDerivation { testToolDepends = [ hspec-discover ]; homepage = "https://github.com/purescript/spago#readme"; license = lib.licenses.bsd3; + mainProgram = "spago"; } |