-
-
Save heath/dfa01fd8918dbd7ceff7134b462aab5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# where i would i put the following in this default.nix? | |
# servant-src = pkgs.fetchFromGitHub { | |
# owner = "haskell-servant"; | |
# repo = "servant"; | |
# rev = "5998429" ; | |
# sha256 = "1p21x6df0j6zsmjf4z9cahbi15mar80na8rx8hl9mkb9pfrj9dic"; | |
# }; | |
# servant-client-ghcjs = pkgs.haskell.packages.ghcjs.callCabal2nix "${servant-src}/servant-client-ghcjs" {}; | |
with (import (builtins.fetchTarball { | |
url = "https://github.com/dmjio/miso/archive/561ffad.tar.gz"; | |
sha256 = "1wwzckz2qxb873wdkwqmx9gmh0wshcdxi7gjwkba0q51jnkfdi41"; | |
}) {}); | |
let | |
server = pkgs.haskell.packages.ghc865.callCabal2nix "app" ./. {}; | |
client = pkgs.haskell.packages.ghcjs86.callCabal2nix "app" ./. {}; | |
in | |
{ | |
inherit server client; | |
app = pkgs.runCommand "my-ghcjs-app" { inherit client server; } '' | |
mkdir -p $out/{bin,static} | |
cp ${server}/bin/* $out/bin/ | |
${pkgs.tree}/bin/tree -a ${client} | |
cp ${client}/bin/client.jsexe/all.js $out/static/ | |
''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ useServer ? false }: | |
with (import ./default.nix); | |
if useServer | |
then server.env | |
else client.env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment