diff options
Diffstat (limited to 'pkgs/development/tools/purescript/spago/default.nix')
-rw-r--r-- | pkgs/development/tools/purescript/spago/default.nix | 88 |
1 files changed, 42 insertions, 46 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 + ''; + }; + })) + ] |