Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitea, 5}: 6 7buildGoModule rec { 8 pname = "lenpaste"; 9 version = "1.3"; 10 11 src = fetchFromGitea { 12 domain = "git.lcomrade.su"; 13 owner = "root"; 14 repo = "lenpaste"; 15 rev = "v${version}"; 16 sha256 = "sha256-d+FjfEbInlxUllWIoVLwQRdRWjxBLTpNHYn+oYU3fBc="; 17 }; 18 19 vendorHash = "sha256-PL0dysBn1+1BpZWFW/EUFJtqkabt+XN00YkAz8Yf2LQ="; 20 21 ldflags = [ 22 "-w" 23 "-s" 24 "-X main.Version=${version}" 25 ]; 26 27 subPackages = [ "cmd" ]; 28 29 postInstall = '' 30 mv $out/bin/cmd $out/bin/lenpaste 31 ''; 32 33 meta = with lib; { 34 description = "Web service that allows you to share notes anonymously, an alternative to pastebin.com"; 35 homepage = "https://git.lcomrade.su/root/lenpaste"; 36 license = licenses.agpl3Plus; 37 maintainers = with maintainers; [ ]; 38 mainProgram = "lenpaste"; 39 }; 40}