diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-09-13 12:56:08 +0200 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-09-13 12:56:08 +0200 |
commit | 4f01edb9230f58ff84b0dd892c931ec8ac9aad55 (patch) | |
tree | 9c1598a3f98203913ac2548883c02a81deb33dc7 /srv/default.nix | |
parent | 5485984e05aebde22819adebfbd5ad51475a6c21 (diff) |
move src out of srv, clean up default.nix and Makefile
Diffstat (limited to 'srv/default.nix')
-rw-r--r-- | srv/default.nix | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/srv/default.nix b/srv/default.nix deleted file mode 100644 index e6216b3..0000000 --- a/srv/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - bash, - go, - buildGoModule, - sqlite, - writeScript, - writeText, - stdenv, - - config, -}: rec { - - init = writeText "mediocre-blog-srv-init" '' - - export MEDIOCRE_BLOG_DATA_DIR="${config.dataDir}" - - # mailing list - export MEDIOCRE_BLOG_ML_SMTP_ADDR="${config.mlSMTPAddr}" - export MEDIOCRE_BLOG_ML_SMTP_AUTH="${config.mlSMTPAuth}" - export MEDIOCRE_BLOG_ML_PUBLIC_URL="${config.publicURL}" - - # pow - export MEDIOCRE_BLOG_POW_SECRET="${config.powSecret}" - - # http - export MEDIOCRE_BLOG_HTTP_PUBLIC_URL="${config.publicURL}" - export MEDIOCRE_BLOG_HTTP_LISTEN_PROTO="${config.httpListenProto}" - export MEDIOCRE_BLOG_HTTP_LISTEN_ADDR="${config.httpListenAddr}" - export MEDIOCRE_BLOG_HTTP_AUTH_USERS='${builtins.toJSON config.httpAuthUsers}' - export MEDIOCRE_BLOG_HTTP_AUTH_RATELIMIT='${config.httpAuthRatelimit}' - ''; - - build = buildGoModule { - pname = "mediocre-blog-srv"; - version = "dev"; - src = ./src; - vendorSha256 = "sha256:1vazrrg8rs9n8x40c9r53h9qnyxw59xkp0aq7jl15fliigk6q0cr"; - - # disable tests - checkPhase = ''''; - }; - - bin = writeScript "mediocre-blog-srv-bin" '' - #!${bash}/bin/bash - source ${init} - exec ${build}/bin/mediocre-blog "$@" - ''; - - shell = stdenv.mkDerivation { - name = "mediocre-blog-srv-shell"; - buildInputs = [ go sqlite ]; - shellHook = '' - source ${init} - - echo "Loading test data..." - (cd srv/src/cmd/load-test-data && go run main.go) - ''; - }; -} |