about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/lenpaste/default.nix
blob: bb9bf30899f5928e8bb907f6d0b45638361862d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, buildGoModule, fetchFromGitea }:

buildGoModule rec {
  pname = "lenpaste";
  version = "1.3";

  src = fetchFromGitea {
    domain = "git.lcomrade.su";
    owner = "root";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-d+FjfEbInlxUllWIoVLwQRdRWjxBLTpNHYn+oYU3fBc=";
  };

  vendorSha256 = "sha256-PL0dysBn1+1BpZWFW/EUFJtqkabt+XN00YkAz8Yf2LQ=";

  ldflags = [
    "-w"
    "-s"
    "-X main.Version=${version}"
  ];

  subPackages = [ "cmd" ];

  postInstall = ''
    mv $out/bin/cmd $out/bin/lenpaste
  '';

  meta = with lib; {
    description = "A web service that allows you to share notes anonymously, an alternative to pastebin.com";
    homepage = "https://git.lcomrade.su/root/lenpaste";
    license = licenses.agpl3Plus;
    maintainers = with maintainers; [ vector1dev ];
  };
}