blob: d0239a672ad86394f0c0367c3418d3df6ac61d79 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{ pkgs, ... }:
pkgs.buildGoModule rec {
name = "govanity";
src = ./.;
vendorSha256 = "sha256-iu2QE+vvenFWpOOz1NHVQHudiWkvkKqZvD4ZX4Xa1sY=";
nativeBuildInputs = with pkgs; [ go ];
deploy = pkgs.pkgs.writeShellScriptBin "run-deploy" ''
set -euo pipefail
export PATH=${pkgs.lib.makeBinPath [ pkgs.go pkgs.flyctl ]}:$PATH
cd ${src}
# run the tests, if they fail, we bail
echo "running tests ...."
${pkgs.go}/bin/go test -v
echo "deploying ...."
${pkgs.flyctl}/bin/flyctl deploy
'';
meta = with pkgs.lib; {
description = "simple server for golang packages";
homepage = "https://golang.fcuny.net";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ ];
};
}
|