-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
46 lines (35 loc) · 856 Bytes
/
shell.nix
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ pkgs ? import <nixpkgs> {} }:
let
# get pocketbase from github release archive
newPocketbase = pkgs.buildGoModule rec {
name = "pocketbase";
version = "v0.22.9";
src = pkgs.fetchFromGitHub {
owner = "pocketbase";
repo = "pocketbase";
rev = "v${version}";
sha256 = "sha256-9LIOBfNOa+u7yLL7iWb/e7c8ZSiyjukqaY0ifVR2iSs=";
};
vendorHash = "sha256-LFIJClPByaLXtsBOk7SjpJlIuQhWbVIs6H4PXhd7oyo=";
# This is the released subpackage from upstream repo
subPackages = [ "examples/base" ];
CGO_ENABLED = 0;
# Upstream build instructions
ldflags = [
"-s"
"-w"
"-X github.com/pocketbase/pocketbase.Version=${version}"
];
postInstall = ''
mv $out/bin/base $out/bin/pocketbase
'';
};
in pkgs.mkShell {
packages = with pkgs; [
nodejs_18
nodePackages.pnpm
newPocketbase
caddy
cloudflared
];
}