nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 48 lines 1.0 kB view raw
1{ 2 buildGoModule, 3 fetchFromGitHub, 4 installShellFiles, 5 lib, 6 stdenv, 7}: 8 9let 10 version = "2.7.5"; 11 12 src = fetchFromGitHub { 13 owner = "influxdata"; 14 repo = "influx-cli"; 15 rev = "v${version}"; 16 sha256 = "sha256-0Gyoy9T5pA+40k8kKybWBMtOfpKZxw3Vvp4ZB4ptcJs="; 17 }; 18 19in 20buildGoModule { 21 pname = "influx-cli"; 22 version = version; 23 inherit src; 24 25 nativeBuildInputs = [ installShellFiles ]; 26 27 vendorHash = "sha256-Ov0TPoMm0qi7kkWUUni677sCP1LwkT9+n3KHcAlQkDA="; 28 subPackages = [ "cmd/influx" ]; 29 30 ldflags = [ 31 "-X main.commit=v${version}" 32 "-X main.version=${version}" 33 ]; 34 35 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 36 installShellCompletion --cmd influx \ 37 --bash <($out/bin/influx completion bash) \ 38 --zsh <($out/bin/influx completion zsh) 39 ''; 40 41 meta = { 42 description = "CLI for managing resources in InfluxDB v2"; 43 license = lib.licenses.mit; 44 homepage = "https://influxdata.com/"; 45 maintainers = [ ]; 46 mainProgram = "influx"; 47 }; 48}