diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-09T09·19+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-09T09·19+0100 |
commit | 9df2b49afd4217edb0307a2b17d04a5978bd5b8c (patch) | |
tree | b40ec9d15d83f60837f806442565475e687aadb6 /website/sandbox | |
parent | 119c8e9df975d16154c85363c9e93a40fe38231e (diff) |
Initialize a default.nix for nix-build
As the previous commit mentions, I'm attempting to build and deploy this project with `nix-shell` and `nix-build` instead of `cabal` and `stack`. I'm in the Hamburg airport right now, and my internet connection isn't stable enough to test this, so I'm committing it until I can more robustly test it.
Diffstat (limited to 'website/sandbox')
-rw-r--r-- | website/sandbox/learnpianochords/src/server/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/website/sandbox/learnpianochords/src/server/default.nix b/website/sandbox/learnpianochords/src/server/default.nix new file mode 100644 index 000000000000..a39f89b043ba --- /dev/null +++ b/website/sandbox/learnpianochords/src/server/default.nix @@ -0,0 +1,27 @@ +let + pkgs = import /home/wpcarro/nixpkgs {}; + ghc = pkgs.haskellPackages.ghcWithPackages (hpkgs: [ + hpkgs.servant-server + hpkgs.aeson + hpkgs.wai-cors + hpkgs.warp + hpkgs.jwt + hpkgs.unordered-containers + hpkgs.base64 + hpkgs.http-conduit + hpkgs.rio + ]); +in pkgs.stdenv.mkDerivation { + name = "LearnPianoChords-server"; + srcs = builtins.path { + path = ./.; + name = "LearnPianoChords-server-src"; + }; + buildPhase = '' + ${ghc} -O Main.hs \ + -XOverloadedStrings \ + -XNoImplicitPrelude \ + -XRecordWildCards \ + -XTypeApplications + ''; +} |