ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / po / pocketbase / package.nix
blobbbf70ab526b162e5ed48ab5a2c60c7709b86093e
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , nix-update-script
5 }:
7 buildGoModule rec {
8   pname = "pocketbase";
9   version = "0.23.1";
11   src = fetchFromGitHub {
12     owner = "pocketbase";
13     repo = "pocketbase";
14     rev = "v${version}";
15     hash = "sha256-he4lvlIqbIozbtMizZEjfnBbXXd6+LfZqKD95UE8sPI=";
16   };
18   vendorHash = "sha256-zMHEArUS4/r7nkZfDK8BwGMLrpkBihxhkBoO/p6auTk=";
20   # This is the released subpackage from upstream repo
21   subPackages = [ "examples/base" ];
23   CGO_ENABLED = 0;
25   # Upstream build instructions
26   ldflags = [
27     "-s"
28     "-w"
29     "-X github.com/pocketbase/pocketbase.Version=${version}"
30   ];
32   postInstall = ''
33     mv $out/bin/base $out/bin/pocketbase
34   '';
36   passthru.updateScript = nix-update-script { };
38   meta = with lib; {
39     description = "Open Source realtime backend in 1 file";
40     homepage = "https://github.com/pocketbase/pocketbase";
41     license = licenses.mit;
42     maintainers = with maintainers; [ dit7ya thilobillerbeck ];
43     mainProgram = "pocketbase";
44   };