nixpkgs/pkgs/servers/pocketbase/default.nix

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

42 lines
887 B
Nix
Raw Normal View History

2022-08-21 01:45:05 +02:00
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "pocketbase";
2022-11-03 22:12:03 +01:00
version = "0.7.10";
2022-08-21 01:45:05 +02:00
src = fetchFromGitHub {
owner = "pocketbase";
repo = pname;
rev = "v${version}";
2022-11-03 22:12:03 +01:00
sha256 = "sha256-KQMCWriPJ3fUXjG+uAqOMbR8dZDrlxQ3iDqyYHhC6hI=";
2022-08-21 01:45:05 +02:00
};
2022-09-27 00:37:49 +02:00
vendorSha256 = "sha256-i3CRba2HA7dOEh4PU1rNZUl05pZqIm946lIjP7ZcFEc=";
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
'';
meta = with lib; {
description = "Open Source realtime backend in 1 file";
homepage = "https://github.com/pocketbase/pocketbase";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
};
}