Skip to content

Commit

Permalink
Change README to use mkBuildProjectOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bock committed Sep 1, 2019
1 parent d736270 commit c4aad22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ let
in
pkgs.stdenv.mkDerivation rec {
# < ... >
src = ./.;
buildInputs = [ spagoPackages.installSpagoStyle ];
buildPhase =
''
${spagoPkgs.installSpagoStyle} # == spago2nix install
${spagoPkgs.buildSpagoStyle} # == spago2nix build
installSpagoStyle # == spago2nix install
${spagoPackages.mkBuildProjectOutput { inherit src purescript; }}
'';
# < ... >
}
Expand Down
8 changes: 4 additions & 4 deletions src/Generate.purs
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,20 @@ in {
'';
buildSpagoStyle = pkgs.writeShellScriptBin "build-spago-style" ''
EXTRA_FILES=$@
EXTRA_FILES="$@"
echo "echo building project..."
echo "purs compile ${builtins.toString (
builtins.map getGlob (builtins.attrValues inputs))}" \"\$EXTRA_FILES\"
builtins.map getGlob (builtins.attrValues inputs))}" \$EXTRA_FILES
echo "echo done."
'';
buildFromNixStore = pkgs.writeShellScriptBin "build-from-store" ''
EXTRA_FILES=$@
EXTRA_FILES="$@"
echo "echo building project using sources from nix store..."
echo "purs compile ${builtins.toString (
builtins.map getStoreGlob (builtins.attrValues inputs))}" \"\$EXTRA_FILES\"
builtins.map getStoreGlob (builtins.attrValues inputs))}" \$EXTRA_FILES
echo "echo done."
'';
Expand Down

0 comments on commit c4aad22

Please sign in to comment.