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
1008 B
Nix
Raw Normal View History

2022-08-21 02:45:05 +03:00
{ lib
, buildGoModule
, fetchFromGitHub
2023-11-09 16:38:51 +03:00
, nix-update-script
2022-08-21 02:45:05 +03:00
}:
buildGoModule rec {
pname = "pocketbase";
2024-02-29 12:08:18 +03:00
version = "0.22.0";
2022-08-21 02:45:05 +03:00
src = fetchFromGitHub {
owner = "pocketbase";
2023-09-10 18:01:11 +03:00
repo = "pocketbase";
2022-08-21 02:45:05 +03:00
rev = "v${version}";
2024-02-29 12:08:18 +03:00
hash = "sha256-CVGxjAgVsGTtUTkowghIh831riKfaTp4cjUjDO+oFG4=";
2022-08-21 02:45:05 +03:00
};
2024-02-29 12:08:18 +03:00
vendorHash = "sha256-Q3DlOKaE3fUlRMSfi8Ta9ZyyOE+viiONVUO8x4JACDg=";
2022-08-21 02:45:05 +03: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 16:38:51 +03:00
passthru.updateScript = nix-update-script { };
2022-08-21 02:45:05 +03: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-24 00:09:35 +03:00
mainProgram = "pocketbase";
2022-08-21 02:45:05 +03:00
};
}