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-01-02 11:29:13 +00:00
|
|
|
version = "0.20.2";
|
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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-+8D562PwSwplSI4vXXeMO2e3DazpANA4hcJGkVCspOw=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
vendorHash = "sha256-Y70GNXThSZdG+28/ZQgxXhyZWAtMu0OM97Yhmo0Eigc=";
|
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
|
|
|
};
|
|
|
|
}
|