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.
This commit is contained in:
parent
119c8e9df9
commit
9df2b49afd
1 changed files with 27 additions and 0 deletions
27
website/sandbox/learnpianochords/src/server/default.nix
Normal file
27
website/sandbox/learnpianochords/src/server/default.nix
Normal file
|
@ -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
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue