diff options
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/blockbook/default.nix | 5 | ||||
-rw-r--r-- | pkgs/servers/etcd/default.nix | 41 | ||||
-rw-r--r-- | pkgs/servers/hashi-ui/default.nix | 25 | ||||
-rw-r--r-- | pkgs/servers/monitoring/prometheus/alertmanager.nix | 8 | ||||
-rw-r--r-- | pkgs/servers/monitoring/prometheus/mail-exporter.nix | 8 | ||||
-rw-r--r-- | pkgs/servers/sql/cockroachdb/default.nix | 5 |
6 files changed, 63 insertions, 29 deletions
diff --git a/pkgs/servers/blockbook/default.nix b/pkgs/servers/blockbook/default.nix index b931e8cfcb2..b6a1887bf80 100644 --- a/pkgs/servers/blockbook/default.nix +++ b/pkgs/servers/blockbook/default.nix @@ -39,9 +39,7 @@ buildGoPackage rec { packr clean && packr ''; - postInstall = '' - rm $bin/bin/{scripts,templates,trezor-common} - ''; + subPackages = [ "." ]; meta = with lib; { description = "Trezor address/account balance backend"; @@ -51,4 +49,3 @@ buildGoPackage rec { platforms = platforms.all; }; } - diff --git a/pkgs/servers/etcd/default.nix b/pkgs/servers/etcd/default.nix index a5083a20cb7..9a2bf7ce590 100644 --- a/pkgs/servers/etcd/default.nix +++ b/pkgs/servers/etcd/default.nix @@ -1,33 +1,40 @@ -{ lib, libpcap, buildGoPackage, fetchFromGitHub }: - -with lib; +{ lib, buildGoPackage, fetchFromGitHub, nixosTests }: buildGoPackage rec { pname = "etcd"; - version = "3.3.13"; # After updating check that nixos tests pass - rev = "v${version}"; + version = "3.3.20"; + # change to "go.etcd.io/etcd" for >= 3.4 goPackagePath = "github.com/coreos/etcd"; src = fetchFromGitHub { - inherit rev; - owner = "coreos"; + owner = "etcd-io"; repo = "etcd"; - sha256 = "1kac4qfr83f2hdz35403f1ald05wc85vvhw79vxb431n61jvyaqy"; + rev = "v${version}"; + sha256 = "1iqq12kkky3cl28k7fabqqyx1i0a2wmbkq0bs8yhiwywp076k08w"; }; - subPackages = [ - "cmd/etcd" - "cmd/etcdctl" - ]; + buildPhase = '' + cd go/src/${goPackagePath} + patchShebangs . + ./build + ./functional/build + ''; + + installPhase = '' + install -Dm755 bin/* bin/functional/cmd/* -t $bin/bin + ''; - buildInputs = [ libpcap ]; + passthru.tests = with nixosTests; { + etcd = etcd; + etcd-cluster = etcd-cluster; + }; - meta = { + meta = with lib; { description = "Distributed reliable key-value store for the most critical data of a distributed system"; license = licenses.asl20; - homepage = "https://coreos.com/etcd/"; - maintainers = with maintainers; [offline]; - platforms = with platforms; linux; + homepage = "https://etcd.io/"; + maintainers = with maintainers; [ offline ]; + platforms = platforms.unix; }; } diff --git a/pkgs/servers/hashi-ui/default.nix b/pkgs/servers/hashi-ui/default.nix new file mode 100644 index 00000000000..019a8dca3b6 --- /dev/null +++ b/pkgs/servers/hashi-ui/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "hashi-ui"; + version = "1.3.8"; + + src = fetchurl { + url = "https://github.com/jippi/hashi-ui/releases/download/v${version}/hashi-ui-linux-amd64"; + sha256 = "999a34b6e99657ffc7e6c98a15b8ea744c28420e891a8802c7d99b737752dfb6"; + }; + + dontUnpack = true; + sourceRoot = "."; + + installPhase = '' + install -m755 -D $src $out/bin/hashi-ui + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/jippi/hashi-ui"; + description = "A modern user interface for hashicorp Consul & Nomad"; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ numkem ]; + }; +} diff --git a/pkgs/servers/monitoring/prometheus/alertmanager.nix b/pkgs/servers/monitoring/prometheus/alertmanager.nix index de6d834c4d6..9074c19e109 100644 --- a/pkgs/servers/monitoring/prometheus/alertmanager.nix +++ b/pkgs/servers/monitoring/prometheus/alertmanager.nix @@ -1,4 +1,4 @@ -{ stdenv, go, buildGoPackage, fetchFromGitHub }: +{ stdenv, go, buildGoPackage, fetchFromGitHub, installShellFiles }: buildGoPackage rec { pname = "alertmanager"; @@ -24,9 +24,11 @@ buildGoPackage rec { -X ${t}.GoVersion=${stdenv.lib.getVersion go} ''; + nativeBuildInputs = [ installShellFiles ]; + postInstall = '' - mkdir -p $bin/etc/bash_completion.d - $NIX_BUILD_TOP/go/bin/amtool --completion-script-bash > $bin/etc/bash_completion.d/amtool_completion.sh + $bin/bin/amtool --completion-script-bash > amtool.bash + installShellCompletion amtool.bash ''; meta = with stdenv.lib; { diff --git a/pkgs/servers/monitoring/prometheus/mail-exporter.nix b/pkgs/servers/monitoring/prometheus/mail-exporter.nix index 1e29eefba2b..f845a6ef256 100644 --- a/pkgs/servers/monitoring/prometheus/mail-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/mail-exporter.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ stdenv, buildGoPackage, fetchFromGitHub, installShellFiles }: buildGoPackage { pname = "mailexporter"; @@ -15,9 +15,11 @@ buildGoPackage { goDeps = ./mail-exporter_deps.nix; + nativeBuildInputs = [ installShellFiles ]; + postInstall = '' - install -D -m 0444 -t $bin/share/man/man1 $src/man/mailexporter.1 - install -D -m 0444 -t $bin/share/man/man5 $src/man/mailexporter.conf.5 + installManPage $src/man/mailexporter.1 + installManPage $src/man/mailexporter.conf.5 ''; meta = with stdenv.lib; { diff --git a/pkgs/servers/sql/cockroachdb/default.nix b/pkgs/servers/sql/cockroachdb/default.nix index 8f3d2a7b285..fb62ee58474 100644 --- a/pkgs/servers/sql/cockroachdb/default.nix +++ b/pkgs/servers/sql/cockroachdb/default.nix @@ -1,6 +1,7 @@ { stdenv, buildGoPackage, fetchurl , cmake, xz, which, autoconf , ncurses6, libedit, libunwind +, installShellFiles }: let @@ -8,7 +9,7 @@ let linuxDeps = [ ncurses6 ]; buildInputs = if stdenv.isDarwin then darwinDeps else linuxDeps; - nativeBuildInputs = [ cmake xz which autoconf ]; + nativeBuildInputs = [ installShellFiles cmake xz which autoconf ]; in buildGoPackage rec { @@ -42,7 +43,7 @@ buildGoPackage rec { runHook preInstall install -D cockroachoss $bin/bin/cockroach - install -D cockroach.bash $bin/share/bash-completion/completions/cockroach.bash + installShellCompletion cockroach.bash mkdir -p $man/share/man cp -r man $man/share/man |