nixpkgs/pkgs/servers/pocketbase/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1009 B
Nix
Raw Normal View History

2022-08-20 23:45:05 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
2023-11-09 13:38:51 +00:00
, nix-update-script
2022-08-20 23:45:05 +00:00
}:
buildGoModule rec {
pname = "pocketbase";
2024-05-15 05:39:35 +00:00
version = "0.22.12";
2022-08-20 23:45:05 +00:00
src = fetchFromGitHub {
owner = "pocketbase";
2023-09-10 15:01:11 +00:00
repo = "pocketbase";
2022-08-20 23:45:05 +00:00
rev = "v${version}";
2024-05-15 05:39:35 +00:00
hash = "sha256-ltz1efvP1wLQx/9rIRvt0ajEvEUaOjSWQzxjFhjXMI4=";
2022-08-20 23:45:05 +00:00
};
2024-05-15 05:39:35 +00:00
vendorHash = "sha256-EsBMnIeSBQw3tu2jSLS9VpmHHyfHw9crGSmOrUIRvoo=";
2022-08-20 23:45:05 +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
'';
2023-11-09 13:38:51 +00:00
passthru.updateScript = nix-update-script { };
2022-08-20 23:45:05 +00:00
meta = with lib; {
description = "Open Source realtime backend in 1 file";
homepage = "https://github.com/pocketbase/pocketbase";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya thilobillerbeck ];
2023-11-23 21:09:35 +00:00
mainProgram = "pocketbase";
2022-08-20 23:45:05 +00:00
};
}