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
1,009 B
Nix
Raw Normal View History

2022-08-21 01:45:05 +02:00
{ lib
, buildGoModule
, fetchFromGitHub
2023-11-09 14:38:51 +01:00
, nix-update-script
2022-08-21 01:45:05 +02:00
}:
buildGoModule rec {
pname = "pocketbase";
2024-05-07 19:00:12 +02:00
version = "0.22.11";
2022-08-21 01:45:05 +02:00
src = fetchFromGitHub {
owner = "pocketbase";
2023-09-10 17:01:11 +02:00
repo = "pocketbase";
2022-08-21 01:45:05 +02:00
rev = "v${version}";
2024-05-07 19:00:12 +02:00
hash = "sha256-PYaAZRD7MPq2+bWqjkX0UrfFG9Er5Isfkm67GY8TO0U=";
2022-08-21 01:45:05 +02:00
};
2024-05-07 19:00:12 +02:00
vendorHash = "sha256-M7UWOUKenXfzro0fcXjT5MGnUcWeiuaLd7GznU81SCA=";
2022-08-21 01:45:05 +02: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 14:38:51 +01:00
passthru.updateScript = nix-update-script { };
2022-08-21 01:45:05 +02: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 22:09:35 +01:00
mainProgram = "pocketbase";
2022-08-21 01:45:05 +02:00
};
}