2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2024-01-02 11:29:13 +00:00
|
|
|
, nix-update-script
|
2022-08-21 13:32:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "pocketbase";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "0.22.21";
|
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}";
|
2024-09-26 11:04:55 +00:00
|
|
|
hash = "sha256-KpW2ThWbAD/c1Z7xSCEbguMTPfBkgngxjXWOPvf5658=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-5lfjwCh930B5k8KbUDW81HkmiO7io4RqEr4VP8MikeA=";
|
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
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "pocketbase";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
}
|