Skip to content

Commit

Permalink
Merge pull request #83472 from Mic92/propragate-darwin-go
Browse files Browse the repository at this point in the history
Propragate darwin go
  • Loading branch information
Mic92 committed Mar 28, 2020
2 parents dc0d459 + 066db11 commit 774ddeb
Show file tree
Hide file tree
Showing 137 changed files with 446 additions and 867 deletions.
4 changes: 1 addition & 3 deletions pkgs/applications/blockchains/go-ethereum.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit, CoreServices }:
{ stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit }:

buildGoModule rec {
pname = "go-ethereum";
Expand Down Expand Up @@ -30,8 +30,6 @@ buildGoModule rec {
"cmd/wnode"
];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];

# Fix for usb-related segmentation faults on darwin
propagatedBuildInputs =
stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
Expand Down
8 changes: 3 additions & 5 deletions pkgs/applications/blockchains/lnd.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ buildGoModule, fetchFromGitHub, stdenv, Security }:
{ buildGoModule, fetchFromGitHub, lib }:

buildGoModule rec {
pname = "lnd";
Expand All @@ -13,12 +13,10 @@ buildGoModule rec {

modSha256 = "1pvcvpiz6ck8xkgpypchrq9kgkik0jxd7f3jhihbgldsh4zaqiaq";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

meta = with stdenv.lib; {
meta = with lib; {
description = "Lightning Network Daemon";
homepage = "https://github.com/lightningnetwork/lnd";
license = licenses.mit;
license = lib.licenses.mit;
maintainers = with maintainers; [ cypherpunk2140 ];
};
}
6 changes: 2 additions & 4 deletions pkgs/applications/editors/glow/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "glow";
Expand All @@ -13,11 +13,9 @@ buildGoModule rec {

modSha256 = "0r0yq7kgz7i1wf4gxxihdrn1c8mi4wcyhadncxbln24s9c5apxsf";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

buildFlagsArray = [ "-ldflags=" "-X=main.Version=${version}" ];

meta = with stdenv.lib; {
meta = with lib; {
description = "Render markdown on the CLI";
homepage = "https://github.com/charmbracelet/glow";
license = licenses.mit;
Expand Down
7 changes: 2 additions & 5 deletions pkgs/applications/misc/archiver/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ buildGoModule
, fetchFromGitHub
, stdenv
, Security
, lib
}:

buildGoModule rec {
Expand All @@ -17,9 +16,7 @@ buildGoModule rec {

modSha256 = "1mrfqhd0zb78rlqlj2ncb0srwjfl7rzhy2p9mwa82pgysvlp08gv";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

meta = with stdenv.lib; {
meta = with lib; {
description = "Easily create & extract archives, and compress & decompress files of various formats";
homepage = "https://github.com/mholt/archiver";
license = licenses.mit;
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/misc/exercism/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "exercism";
Expand All @@ -13,8 +13,6 @@ buildGoModule rec {

modSha256 = "0pg0hxrr6jjd03wbjn5y65x02md3h352mnm1gr6vyiv7hn4ws14m";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

subPackages = [ "./exercism" ];

meta = with stdenv.lib; {
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/misc/geoipupdate/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "geoipupdate";
Expand All @@ -13,8 +13,6 @@ buildGoModule rec {

modSha256 = "1bypanvrkcqp8rk84cv2569671irgaf3cy27lcrknyina4pdvir5";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

meta = with stdenv.lib; {
description = "Automatic GeoIP database updater";
homepage = "https://github.com/maxmind/geoipupdate";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/misc/hugo/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "hugo";
version = "0.68.3";

goPackagePath = "github.com/gohugoio/hugo";

src = fetchFromGitHub {
owner = "gohugoio";
repo = pname;
Expand All @@ -13,8 +15,6 @@ buildGoModule rec {

modSha256 = "04vzm65kbj9905z4cf5yh6yc6g3b0pd5vc00lrxw84pwgqgc0ykb";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

buildFlags = [ "-tags" "extended" ];

subPackages = [ "." ];
Expand Down
10 changes: 4 additions & 6 deletions pkgs/applications/misc/todoist/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "todoist";
Expand All @@ -13,12 +13,10 @@ buildGoModule rec {

modSha256 = "1nnp5ijz4n34gc97rar4wlvlbx21ndpjyb2mc6gxdk1wzx3mgswp";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

meta = with stdenv.lib; {
meta = {
homepage = https://github.com/sachaos/todoist;
description = "Todoist CLI Client";
license = licenses.mit;
platforms = platforms.unix;
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}
7 changes: 2 additions & 5 deletions pkgs/applications/misc/wtf/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{ buildGoModule
, fetchFromGitHub
, stdenv
, lib
, makeWrapper
, ncurses
, Security
}:

buildGoModule rec {
Expand All @@ -25,14 +24,12 @@ buildGoModule rec {

nativeBuildInputs = [ makeWrapper ];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

postInstall = ''
mv "$out/bin/wtf" "$out/bin/wtfutil"
wrapProgram "$out/bin/wtfutil" --prefix PATH : "${ncurses.dev}/bin"
'';

meta = with stdenv.lib; {
meta = with lib; {
description = "The personal information dashboard for your terminal";
homepage = "https://wtfutil.com/";
license = licenses.mpl20;
Expand Down
6 changes: 2 additions & 4 deletions pkgs/applications/networking/cluster/argo/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, buildGoPackage, fetchFromGitHub, Security }:
{ lib, buildGoModule, buildGoPackage, fetchFromGitHub }:

let
# Argo can package a static server in the CLI using the `staticfiles` go module.
Expand Down Expand Up @@ -32,16 +32,14 @@ buildGoModule rec {

subPackages = [ "cmd/argo" ];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

preBuild = ''
mkdir -p ui/dist/app
echo "Built without static files" > ui/dist/app/index.html
${staticfiles}/bin/staticfiles -o server/static/files.go ui/dist/app
'';

meta = with stdenv.lib; {
meta = with lib; {
description = "Container native workflow engine for Kubernetes";
homepage = https://github.com/argoproj/argo;
license = licenses.asl20;
Expand Down
6 changes: 2 additions & 4 deletions pkgs/applications/networking/cluster/argocd/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, packr, Security }:
{ lib, buildGoModule, fetchFromGitHub, packr }:

buildGoModule rec {
pname = "argocd";
Expand All @@ -16,8 +16,6 @@ buildGoModule rec {

nativeBuildInputs = [ packr ];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

patches = [ ./use-go-module.patch ];

buildFlagsArray = ''
Expand All @@ -33,7 +31,7 @@ buildGoModule rec {
packr
'';

meta = with stdenv.lib; {
meta = with lib; {
description = "Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes";
homepage = "https://github.com/argoproj/argo";
license = licenses.asl20;
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/networking/cluster/atlantis/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "atlantis";
Expand All @@ -15,8 +15,6 @@ buildGoModule rec {

subPackages = [ "." ];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

meta = with stdenv.lib; {
homepage = "https://github.com/runatlantis/atlantis";
description = "Terraform Pull Request Automation";
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/networking/cluster/fluxctl/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "fluxctl";
Expand All @@ -13,8 +13,6 @@ buildGoModule rec {

modSha256 = "0ij5q31a0818nmqsdql1ii6rhq6nb0liplnw509qih8py7dk5xkg";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

subPackages = [ "cmd/fluxctl" ];

meta = with stdenv.lib; {
Expand Down
5 changes: 1 addition & 4 deletions pkgs/applications/networking/cluster/helm/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles, Security }:
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
pname = "helm";
Expand All @@ -16,9 +16,6 @@ buildGoModule rec {
buildFlagsArray = [ "-ldflags=-w -s -X helm.sh/helm/v3/internal/version.version=v${version}" ];

nativeBuildInputs = [ installShellFiles ];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

postInstall = ''
$out/bin/helm completion bash > helm.bash
$out/bin/helm completion zsh > helm.zsh
Expand Down
22 changes: 12 additions & 10 deletions pkgs/applications/networking/cluster/helmfile/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm, Security }:
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm, ... }:

buildGoModule rec {
let version = "0.102.0"; in

buildGoModule {
pname = "helmfile";
version = "0.102.0";
inherit version;

src = fetchFromGitHub {
owner = "roboll";
Expand All @@ -11,27 +13,27 @@ buildGoModule rec {
sha256 = "0v7mhsnhswiqd62wrmkcpzsg9nfi6wvkh9danngs5rqjiz1zffhy";
};

goPackagePath = "github.com/roboll/helmfile";

modSha256 = "0s7j7jbgr8gdc0s9dnl6zjwkpywqj05xyb7mkcank54kgrz0g5vq";

nativeBuildInputs = [ makeWrapper ];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

buildFlagsArray = ''
-ldflags=
-X main.Version=${version}
'';

postInstall = ''
wrapProgram $out/bin/helmfile \
--prefix PATH : ${stdenv.lib.makeBinPath [ kubernetes-helm ]}
--prefix PATH : ${lib.makeBinPath [ kubernetes-helm ]}
'';

meta = with stdenv.lib; {
meta = {
description = "Deploy Kubernetes Helm charts";
homepage = "https://github.com/roboll/helmfile";
license = licenses.mit;
maintainers = with maintainers; [ pneumaticat yurrriq ];
platforms = platforms.unix;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pneumaticat yurrriq ];
platforms = lib.platforms.unix;
};
}
12 changes: 5 additions & 7 deletions pkgs/applications/networking/cluster/hetzner-kube/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "hetzner-kube";
Expand All @@ -13,18 +13,16 @@ buildGoModule rec {

modSha256 = "0jjrk93wdi13wrb5gchhqk7rgwm74kcizrbqsibgkgs2dszwfazh";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

buildFlagsArray = ''
-ldflags=
-X github.com/xetys/hetzner-kube/cmd.version=${version}
'';

meta = with stdenv.lib; {
meta = {
description = "A CLI tool for provisioning Kubernetes clusters on Hetzner Cloud";
homepage = "https://github.com/xetys/hetzner-kube";
license = licenses.asl20;
maintainers = with maintainers; [ eliasp ];
platforms = platforms.unix;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ eliasp ];
platforms = lib.platforms.unix;
};
}
6 changes: 2 additions & 4 deletions pkgs/applications/networking/cluster/jx/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ buildGoModule, fetchFromGitHub, stdenv, Security }:
{ buildGoModule, fetchFromGitHub, lib }:

buildGoModule rec {
name = "jx";
Expand All @@ -16,8 +16,6 @@ buildGoModule rec {
./3321-fix-location-of-thrift.patch
];

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

modSha256 = "0ljf0c0c3pc12nmhdbrwflcaj6hs8igzjw5hi6fyhi6n9cy87vac";

subPackages = [ "cmd/jx" ];
Expand All @@ -28,7 +26,7 @@ buildGoModule rec {
-X github.com/jenkins-x/jx/pkg/version.Revision=${version}
'';

meta = with stdenv.lib; {
meta = with lib; {
description = "JX is a command line tool for installing and using Jenkins X.";
homepage = https://jenkins-x.io;
longDescription = ''
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/networking/cluster/k9s/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub, Security }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
pname = "k9s";
Expand All @@ -22,8 +22,6 @@ buildGoModule rec {

modSha256 = "06m4xgl29zx6zpqx630m9cm52wmljms9cvly5f4pqdb4zicq7n86";

buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

meta = with stdenv.lib; {
description = "Kubernetes CLI To Manage Your Clusters In Style.";
homepage = "https://github.com/derailed/k9s";
Expand Down

0 comments on commit 774ddeb

Please sign in to comment.