diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2020-03-22 08:13:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 08:13:37 -0500 |
commit | 4e6bf03504c9e09f067cc6dee6b5aeec43a1405c (patch) | |
tree | b014a4f89e335fac7758d35a7669792e5ad3c417 /pkgs/servers | |
parent | afd997aab6e9b7a322198092c7828d6c560ac06f (diff) | |
parent | 7eb35cd1447a7c076bd4869c0e2e5f1ee428d70d (diff) |
Merge pull request #83099 from marsam/fix-buildGoModule-packages-darwin
treewide: fix buildGoModule packages on darwin
Diffstat (limited to 'pkgs/servers')
21 files changed, 79 insertions, 38 deletions
diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix index bcd4b7065b587..8b51e584e3ec0 100644 --- a/pkgs/servers/caddy/default.nix +++ b/pkgs/servers/caddy/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "caddy"; @@ -16,6 +16,8 @@ buildGoModule rec { }; modSha256 = "1gc0xvsihr4zp7hkrdfrplvzkaphz1y4q53rgwn2jhd8s98l57an"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + preBuild = '' cat << EOF > caddy/main.go package main diff --git a/pkgs/servers/caddy/v2.nix b/pkgs/servers/caddy/v2.nix index c0b2134abded4..7330388a78593 100644 --- a/pkgs/servers/caddy/v2.nix +++ b/pkgs/servers/caddy/v2.nix @@ -1,4 +1,4 @@ -{ stdenv, callPackage, buildGoModule, fetchFromGitHub }: +{ stdenv, callPackage, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "caddy"; @@ -16,6 +16,8 @@ buildGoModule rec { }; modSha256 = "1sb8w6n84cpya2rjm0zm798kzf5vjpkr5440j1gfnnnr07jl2aqn"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { homepage = "https://caddyserver.com"; description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS"; diff --git a/pkgs/servers/dns/coredns/default.nix b/pkgs/servers/dns/coredns/default.nix index 017842f39dc10..8388968298ef2 100644 --- a/pkgs/servers/dns/coredns/default.nix +++ b/pkgs/servers/dns/coredns/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "coredns"; @@ -15,6 +15,8 @@ buildGoModule rec { modSha256 = "0wlffk6wkcyn2lphw2vmdsmzag0wxljcxrvm7sv3i124x2x3yvy4"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { homepage = "https://coredns.io"; description = "A DNS server that runs middleware"; diff --git a/pkgs/servers/documize-community/default.nix b/pkgs/servers/documize-community/default.nix index 7780d900badfd..a6477d61e9841 100644 --- a/pkgs/servers/documize-community/default.nix +++ b/pkgs/servers/documize-community/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, go-bindata, go-bindata-assetfs }: +{ stdenv, buildGoModule, fetchFromGitHub, go-bindata, go-bindata-assetfs, Security }: buildGoModule rec { pname = "documize-community"; @@ -15,6 +15,8 @@ buildGoModule rec { nativeBuildInputs = [ go-bindata go-bindata-assetfs ]; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + subPackages = [ "edition/community.go" ]; postInstall = '' @@ -23,7 +25,7 @@ buildGoModule rec { mv $out/bin/community $out/bin/documize ''; - meta = with lib; { + meta = with stdenv.lib; { description = "Open source Confluence alternative for internal & external docs built with Golang + EmberJS"; license = licenses.agpl3; maintainers = with maintainers; [ ma27 elseym ]; diff --git a/pkgs/servers/echoip/default.nix b/pkgs/servers/echoip/default.nix index b3402933f9fef..ae6057c34697a 100644 --- a/pkgs/servers/echoip/default.nix +++ b/pkgs/servers/echoip/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule { pname = "echoip"; @@ -13,6 +13,8 @@ buildGoModule { modSha256 = "025p891klwpid5fw4z39fimgfkwgkcwqpn5276hflzdp1hfv35ly"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + outputs = [ "out" "index" ]; postInstall = '' @@ -20,7 +22,7 @@ buildGoModule { cp $src/index.html $index/index.html ''; - meta = with lib; { + meta = with stdenv.lib; { homepage = https://github.com/mpolden/echoip; license = licenses.bsd3; maintainers = with maintainers; [ rvolosatovs ]; diff --git a/pkgs/servers/gobetween/default.nix b/pkgs/servers/gobetween/default.nix index ff59ad53ed1ce..e66d5581b3c8a 100644 --- a/pkgs/servers/gobetween/default.nix +++ b/pkgs/servers/gobetween/default.nix @@ -1,4 +1,4 @@ -{ buildGoModule, fetchFromGitHub, lib, enableStatic ? false }: +{ buildGoModule, fetchFromGitHub, stdenv, Security, enableStatic ? false }: buildGoModule rec { pname = "gobetween"; @@ -14,8 +14,10 @@ buildGoModule rec { modSha256 = "dd91838d20c99c73447590e43edd13c87755276f17ef3e53f24c5df3d0908f78"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + buildPhase = '' - make build${lib.optionalString enableStatic "-static"} + make build${stdenv.lib.optionalString enableStatic "-static"} ''; installPhase = '' @@ -25,7 +27,7 @@ buildGoModule rec { cp -r config $out/share ''; - meta = with lib; { + meta = with stdenv.lib; { description = "Modern & minimalistic load balancer for the Сloud era"; homepage = "http://gobetween.io"; license = licenses.mit; diff --git a/pkgs/servers/gortr/default.nix b/pkgs/servers/gortr/default.nix index 35c6e1452437a..3e5dfc87f0ee2 100644 --- a/pkgs/servers/gortr/default.nix +++ b/pkgs/servers/gortr/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildGoModule }: +{ stdenv, fetchFromGitHub, buildGoModule, Security }: buildGoModule rec { pname = "gortr"; @@ -12,7 +12,9 @@ buildGoModule rec { }; modSha256 = "157dpalfz3z1s3mxq63xy6lrkwzyy9xzmvn7wsxkwznjq4djv1a1"; - meta = with lib; { + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + + meta = with stdenv.lib; { description = "The RPKI-to-Router server used at Cloudflare"; homepage = "https://github.com/cloudflare/gortr/"; license = licenses.gpl3; diff --git a/pkgs/servers/gotify/default.nix b/pkgs/servers/gotify/default.nix index f2014aac9fdcd..275aaa5d68bca 100644 --- a/pkgs/servers/gotify/default.nix +++ b/pkgs/servers/gotify/default.nix @@ -1,11 +1,11 @@ { stdenv , buildGoPackage -, lib , fetchFromGitHub , buildGoModule , packr , sqlite , callPackage +, Security }: buildGoModule rec { @@ -28,7 +28,8 @@ buildGoModule rec { --replace 'Version = "unknown"' 'Version = "${version}"' ''; - buildInputs = [ sqlite ]; + buildInputs = [ sqlite ] + ++ stdenv.lib.optionals stdenv.isDarwin [ Security ]; nativeBuildInputs = [ packr ]; diff --git a/pkgs/servers/imgproxy/default.nix b/pkgs/servers/imgproxy/default.nix index 4cdfddcff6f49..c7d0d910ac1e4 100644 --- a/pkgs/servers/imgproxy/default.nix +++ b/pkgs/servers/imgproxy/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, pkg-config, vips, gobject-introspection }: +{ stdenv, buildGoModule, fetchFromGitHub, pkg-config, vips, gobject-introspection, Security }: buildGoModule rec { pname = "imgproxy"; @@ -15,13 +15,14 @@ buildGoModule rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gobject-introspection vips ]; + buildInputs = [ gobject-introspection vips ] + ++ stdenv.lib.optionals stdenv.isDarwin [ Security ]; preBuild = '' export CGO_LDFLAGS_ALLOW='-(s|w)' ''; - meta = with lib; { + meta = with stdenv.lib; { description = "Fast and secure on-the-fly image processing server written in Go"; homepage = "https://imgproxy.net"; license = licenses.mit; diff --git a/pkgs/servers/matterbridge/default.nix b/pkgs/servers/matterbridge/default.nix index 556625016f251..2eec5d52bb9cb 100644 --- a/pkgs/servers/matterbridge/default.nix +++ b/pkgs/servers/matterbridge/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchurl }: +{ stdenv, buildGoModule, fetchurl, Security }: buildGoModule rec { pname = "matterbridge"; @@ -12,6 +12,8 @@ buildGoModule rec { sha256 = "15wgjzy9l3xlgih2zb56l4jmval4nhcs42wn9axvz2h7kqfbmw3d"; }; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { description = "Simple bridge between Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, Rocket.Chat, Hipchat(via xmpp), Matrix and Steam"; homepage = "https://github.com/42wim/matterbridge"; diff --git a/pkgs/servers/mautrix-whatsapp/default.nix b/pkgs/servers/mautrix-whatsapp/default.nix index 578f125ee2b51..b94eb00547aa1 100644 --- a/pkgs/servers/mautrix-whatsapp/default.nix +++ b/pkgs/servers/mautrix-whatsapp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule { pname = "mautrix-whatsapp-unstable"; @@ -13,6 +13,8 @@ buildGoModule { modSha256 = "0ypj79rjwj5bls6aq2cz0d034dnv1sddl43iz51b4fl2bfv0drm9"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { homepage = https://github.com/tulir/mautrix-whatsapp; description = "Matrix <-> Whatsapp hybrid puppeting/relaybot bridge"; diff --git a/pkgs/servers/minio/default.nix b/pkgs/servers/minio/default.nix index 858f8899501de..1fae973066aae 100644 --- a/pkgs/servers/minio/default.nix +++ b/pkgs/servers/minio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, CoreServices }: buildGoModule rec { pname = "minio"; @@ -13,6 +13,8 @@ buildGoModule rec { modSha256 = "0ikid628v673f7lvp3psk05s3liqlyc3arppg33lfi2cmbaf8hmr"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ]; + subPackages = [ "." ]; buildFlagsArray = [''-ldflags= diff --git a/pkgs/servers/monitoring/mtail/default.nix b/pkgs/servers/monitoring/mtail/default.nix index 64966e183feaf..75b58b65a9cc9 100644 --- a/pkgs/servers/monitoring/mtail/default.nix +++ b/pkgs/servers/monitoring/mtail/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildGoModule }: +{ stdenv, fetchFromGitHub, buildGoModule, Security }: buildGoModule rec { pname = "mtail"; @@ -14,6 +14,8 @@ buildGoModule rec { modSha256 = "0h3q1qd9a01wlfkk0yv74a4bk5nilpsppq522cv7kl8ysnrjh5yi"; subPackages = [ "cmd/mtail" ]; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + preBuild = '' go generate -x ./internal/vm/ ''; @@ -22,7 +24,7 @@ buildGoModule rec { "-ldflags=-X main.Version=${version}" ]; - meta = with lib; { + meta = with stdenv.lib; { license = licenses.asl20; homepage = "https://github.com/google/mtail"; description = "Tool for extracting metrics from application logs"; diff --git a/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix index c8013e6bc15c7..773fddd311bbd 100644 --- a/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "dnsmasq_exporter"; @@ -13,6 +13,8 @@ buildGoModule rec { modSha256 = "1ag1k0z35zkazaxj8hh2wxfj73xg63xdybfm1565il2vxs5986dh"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { inherit (src.meta) homepage; description = "A dnsmasq exporter for Prometheus"; diff --git a/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix b/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix index 12341eee911ed..96526d246a6da 100644 --- a/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "mikrotik-exporter-unstable"; @@ -13,6 +13,8 @@ buildGoModule rec { modSha256 = "1cqjn6j3dfq51ssjx0qrajprlac1h0lb1r4af44lfpigzmrfyi07"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { inherit (src.meta) homepage; description = "Prometheus MikroTik device(s) exporter"; diff --git a/pkgs/servers/monitoring/prometheus/varnish-exporter.nix b/pkgs/servers/monitoring/prometheus/varnish-exporter.nix index d776756719507..a0e3c6b1783c8 100644 --- a/pkgs/servers/monitoring/prometheus/varnish-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/varnish-exporter.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, makeWrapper, varnish }: +{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper, varnish, Security }: buildGoModule rec { pname = "prometheus_varnish_exporter"; @@ -15,6 +15,8 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + postInstall = '' wrapProgram $out/bin/prometheus_varnish_exporter \ --prefix PATH : "${varnish}/bin" @@ -22,10 +24,10 @@ buildGoModule rec { doCheck = true; - meta = { + meta = with stdenv.lib; { homepage = "https://github.com/jonnenauha/prometheus_varnish_exporter"; description = "Varnish exporter for Prometheus"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ]; + license = licenses.mit; + maintainers = with maintainers; [ MostAwesomeDude willibutz ]; }; } diff --git a/pkgs/servers/monitoring/sensu-go/default.nix b/pkgs/servers/monitoring/sensu-go/default.nix index f109b08d1a6fd..adba0277bf779 100644 --- a/pkgs/servers/monitoring/sensu-go/default.nix +++ b/pkgs/servers/monitoring/sensu-go/default.nix @@ -1,4 +1,4 @@ -{ buildGoModule, fetchFromGitHub, lib }: +{ buildGoModule, fetchFromGitHub, stdenv, Security }: let generic = { subPackages, pname, postInstall ? "" }: @@ -20,6 +20,8 @@ let modSha256 = "02h4cav6ivzs3z0qakwxzf5lfy6hzax5c0i2icp0qymqc2789npw"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + buildFlagsArray = let versionPkg = "github.com/sensu/sensu-go/version"; in '' @@ -28,11 +30,11 @@ let -X ${versionPkg}.BuildSHA=${shortRev} ''; - meta = { + meta = with stdenv.lib; { homepage = "https://sensu.io"; description = "Open source monitoring tool for ephemeral infrastructure & distributed applications"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ thefloweringash ]; + license = licenses.mit; + maintainers = with maintainers; [ thefloweringash ]; }; }; in diff --git a/pkgs/servers/monitoring/thanos/default.nix b/pkgs/servers/monitoring/thanos/default.nix index f307032f41417..a246249d7d71c 100644 --- a/pkgs/servers/monitoring/thanos/default.nix +++ b/pkgs/servers/monitoring/thanos/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "thanos"; version = "0.11.0"; @@ -12,6 +12,8 @@ buildGoModule rec { modSha256 = "1pdypyyy352l6wy5lr94fv8j890lh863h8zg2hxchiymrs5pgq1c"; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + subPackages = "cmd/thanos"; buildFlagsArray = let t = "github.com/prometheus/common/version"; in '' diff --git a/pkgs/servers/nosql/victoriametrics/default.nix b/pkgs/servers/nosql/victoriametrics/default.nix index 2d357712096ab..f85c4aebd512b 100644 --- a/pkgs/servers/nosql/victoriametrics/default.nix +++ b/pkgs/servers/nosql/victoriametrics/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "VictoriaMetrics"; @@ -12,7 +12,10 @@ buildGoModule rec { }; modSha256 = "0qzh3jmj7ps6xmnnmfr8bnq97kdkn58p6dxppmlypanar3zsn7vk"; - meta = with lib; { + + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + + meta = with stdenv.lib; { homepage = "https://victoriametrics.com/"; description = "fast, cost-effective and scalable time series database, long-term remote storage for Prometheus"; license = licenses.asl20; diff --git a/pkgs/servers/sql/dolt/default.nix b/pkgs/servers/sql/dolt/default.nix index dbface601f548..27ab7d444bf1f 100644 --- a/pkgs/servers/sql/dolt/default.nix +++ b/pkgs/servers/sql/dolt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, lib, buildGoModule }: +{ stdenv, fetchFromGitHub, buildGoModule, Security }: buildGoModule rec { pname = "dolt"; @@ -15,7 +15,9 @@ buildGoModule rec { subPackages = [ "cmd/dolt" "cmd/git-dolt" "cmd/git-dolt-smudge" ]; modSha256 = "04bsj8mfamnbq3y2aqbx1605azi8v15nbdh1zk5grni0ihlal75a"; - meta = with lib; { + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + + meta = with stdenv.lib; { description = "Relational database with version control and CLI a-la Git."; homepage = "https://github.com/liquidata-inc/dolt"; license = licenses.asl20; diff --git a/pkgs/servers/web-apps/shiori/default.nix b/pkgs/servers/web-apps/shiori/default.nix index dd4cdc08287b6..bd17f2f267c61 100644 --- a/pkgs/servers/web-apps/shiori/default.nix +++ b/pkgs/servers/web-apps/shiori/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, Security }: buildGoModule rec { pname = "shiori"; @@ -13,6 +13,8 @@ buildGoModule rec { sha256 = "13and7gh2882khqppwz3wwq44p7az4bfdfjvlnqcpqyi8xa28pmq"; }; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + meta = with stdenv.lib; { description = "Simple bookmark manager built with Go"; homepage = "https://github.com/go-shiori/shiori"; |