nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 40 lines 1.1 kB view raw
1{ 2 buildGoModule, 3 lib, 4 fetchFromGitHub, 5}: 6buildGoModule rec { 7 pname = "cntb"; 8 version = "1.5.5"; 9 10 src = fetchFromGitHub { 11 owner = "contabo"; 12 repo = "cntb"; 13 rev = "v${version}"; 14 hash = "sha256-chO59HBpMXXFMIt+7UjUxE3WtzUak8VhD/ahEXT5l/k="; 15 # docs contains two files with the same name but different cases, 16 # this leads to a different hash on case insensitive filesystems (e.g. darwin) 17 # https://github.com/contabo/cntb/issues/34 18 postFetch = '' 19 rm -rf $out/openapi/docs 20 ''; 21 }; 22 23 subPackages = [ "." ]; 24 25 vendorHash = "sha256-D0B1a2qbTGpAK1PkB+wqsReft14/SoKY3/I6k+pB2D0="; 26 27 ldflags = [ 28 "-X contabo.com/cli/cntb/cmd.version=${src.rev}" 29 "-X contabo.com/cli/cntb/cmd.commit=${src.rev}" 30 "-X contabo.com/cli/cntb/cmd.date=1970-01-01T00:00:00Z" 31 ]; 32 33 meta = with lib; { 34 description = "CLI tool for managing your products from Contabo like VPS and VDS"; 35 mainProgram = "cntb"; 36 homepage = "https://github.com/contabo/cntb"; 37 license = licenses.gpl3Only; 38 maintainers = with maintainers; [ aciceri ]; 39 }; 40}