2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "pocketbase";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.18.10";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pocketbase";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "pocketbase";
|
2022-08-21 13:32:41 +00:00
|
|
|
rev = "v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-fbzoUmxWwQYEGrUIXtHP6Lz71C51TR30gz+5deB00LM=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
vendorHash = "sha256-b0i+I/HzHbpmgclYn2g6MtpbslT/sLm9K2woMjvWaD0=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Open Source realtime backend in 1 file";
|
|
|
|
homepage = "https://github.com/pocketbase/pocketbase";
|
|
|
|
license = licenses.mit;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ dit7ya thilobillerbeck ];
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
}
|