Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate some go builds from buildGoPackage to buildGoModule #86282

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkgs/applications/misc/cointop/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub }:

buildGoPackage rec {
buildGoModule rec {
pname = "cointop";
version = "1.4.4";

Expand All @@ -11,7 +11,6 @@ buildGoPackage rec {
sha256 = "12yi1lmyd5y4cgcjclkczf93jj7wd6k8aqnhq21dd1mx65l77swv";
};

goPackagePath = "github.com/miguelmota/cointop";

meta = with lib; {
description = "The fastest and most interactive terminal based UI application for tracking cryptocurrencies";
Expand All @@ -26,4 +25,4 @@ buildGoPackage rec {
maintainers = [ maintainers.marsam ];
license = licenses.asl20;
};
}
}
7 changes: 3 additions & 4 deletions pkgs/applications/misc/overmind/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{ lib, buildGoPackage, fetchFromGitHub, tmux, which, makeWrapper }:
{ lib, buildGoModule, fetchFromGitHub, tmux, which, makeWrapper }:

buildGoPackage rec {
buildGoModule rec {
pname = "overmind";
version = "2.0.3";
goPackagePath = "github.com/DarthSim/overmind";

nativeBuildInputs = [ makeWrapper ];

Expand All @@ -24,4 +23,4 @@ buildGoPackage rec {
license = with licenses; [ mit ];
maintainers = [ maintainers.adisbladis ];
};
}
}
7 changes: 3 additions & 4 deletions pkgs/applications/networking/brig/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoPackage rec {
buildGoModule rec {
pname = "brig";
version = "0.4.1";
rev = "v${version}";

goPackagePath = "github.com/sahib/brig";
subPackages = ["."];

src = fetchFromGitHub {
Expand All @@ -22,4 +21,4 @@ buildGoPackage rec {
platforms = platforms.unix;
maintainers = with maintainers; [ offline ];
};
}
}
8 changes: 3 additions & 5 deletions pkgs/applications/networking/cluster/docker-machine/kvm.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# This file was generated by go2nix.
{ stdenv, buildGoPackage, fetchFromGitHub, libvirt, pkgconfig }:
{ stdenv, buildGoModule, fetchFromGitHub, libvirt, pkgconfig }:

buildGoPackage rec {
buildGoModule rec {
pname = "docker-machine-kvm";
version = "0.10.0";

goPackagePath = "github.com/dhiltgen/docker-machine-kvm";
goDeps = ./kvm-deps.nix;

src = fetchFromGitHub {
rev = "v${version}";
Expand All @@ -25,4 +23,4 @@ buildGoPackage rec {
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;
};
}
}
10 changes: 3 additions & 7 deletions pkgs/applications/networking/cluster/docker-machine/xhyve.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, pkgconfig, cctools, Hypervisor, vmnet }:
{ stdenv, buildGoModule, fetchFromGitHub, fetchpatch, pkgconfig, cctools, Hypervisor, vmnet }:

buildGoPackage rec {
buildGoModule rec {
pname = "docker-machine-xhyve";
version = "0.4.0";

goPackagePath = "github.com/zchee/docker-machine-driver-xhyve";

# https://github.com/machine-drivers/docker-machine-driver-xhyve/pull/225
patches = fetchpatch {
Expand All @@ -13,9 +12,6 @@ buildGoPackage rec {
};

preBuild = ''
make -C go/src/${goPackagePath} CC=${stdenv.cc}/bin/cc LIBTOOL=${cctools}/bin/libtool GIT_CMD=: lib9p
export CGO_CFLAGS=-I$(pwd)/go/src/${goPackagePath}/vendor/github.com/jceel/lib9p
export CGO_LDFLAGS=$(pwd)/go/src/${goPackagePath}/vendor/build/lib9p/lib9p.a
'';
buildFlags = "--tags lib9p";

Expand All @@ -36,4 +32,4 @@ buildGoPackage rec {
maintainers = with maintainers; [ periklis ];
platforms = platforms.darwin;
};
}
}
7 changes: 3 additions & 4 deletions pkgs/applications/networking/cluster/kubecfg/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ lib, buildGoPackage, fetchFromGitHub, ... }:
{ lib, buildGoModule, fetchFromGitHub, ... }:

let version = "0.13.1"; in

buildGoPackage {
buildGoModule {
pname = "kubecfg";
inherit version;

Expand All @@ -13,7 +13,6 @@ buildGoPackage {
sha256 = "0x2mg13p8r1sgqr1bbzh57kfymb8z392y43djgks2agc7rjnd45f";
};

goPackagePath = "github.com/bitnami/kubecfg";

meta = {
description = "A tool for managing Kubernetes resources as code";
Expand All @@ -22,4 +21,4 @@ buildGoPackage {
maintainers = with lib.maintainers; [ benley ];
platforms = lib.platforms.unix;
};
}
}
7 changes: 3 additions & 4 deletions pkgs/applications/networking/cluster/kubeless/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoPackage rec {
buildGoModule rec {
pname = "kubeless";
version = "1.0.4";

Expand All @@ -11,7 +11,6 @@ buildGoPackage rec {
sha256 = "1f5w6kn9rsaxx9nf6kzyjkzm3s9ycy1c8h78hb61v4x915xd3040";
};

goPackagePath = "github.com/kubeless/kubeless";

subPackages = [ "cmd/kubeless" ];

Expand All @@ -26,4 +25,4 @@ buildGoPackage rec {
maintainers = with maintainers; [];
platforms = platforms.unix;
};
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "terraform-docs";
version = "0.9.1";

goPackagePath = "github.com/segmentio/${pname}";

src = fetchFromGitHub {
owner = "segmentio";
Expand All @@ -22,4 +21,4 @@ buildGoPackage rec {
license = licenses.mit;
maintainers = with maintainers; [ zimbatm ];
};
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{ stdenv, fetchFromGitHub, buildGoPackage }:
buildGoPackage rec {
{ stdenv, fetchFromGitHub, buildGoModule }:
buildGoModule rec {
pname = "terraform-provider-ansible";
version = "1.0.3";

goPackagePath = "github.com/nbering/terraform-provider-ansible";
goDeps = ./deps.nix;

src = fetchFromGitHub {
owner = "nbering";
Expand All @@ -23,4 +21,4 @@ buildGoPackage rec {
license = licenses.mpl20;
maintainers = with maintainers; [ uskudnik ];
};
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, libvirt, pkgconfig, makeWrapper, cdrtools }:
{ stdenv, buildGoModule, fetchFromGitHub, libvirt, pkgconfig, makeWrapper, cdrtools }:

# USAGE:
# install the following package globally or in nix-shell:
Expand All @@ -17,11 +17,10 @@
# pick an example from (i.e ubuntu):
# https://github.com/dmacvicar/terraform-provider-libvirt/tree/master/examples

buildGoPackage rec {
buildGoModule rec {
pname = "terraform-provider-libvirt";
version = "0.6.1";

goPackagePath = "github.com/dmacvicar/terraform-provider-libvirt";

src = fetchFromGitHub {
owner = "dmacvicar";
Expand Down Expand Up @@ -49,4 +48,4 @@ buildGoPackage rec {
license = licenses.asl20;
maintainers = with maintainers; [ mic92 ];
};
}
}
8 changes: 3 additions & 5 deletions pkgs/applications/networking/cluster/terraform/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{ stdenv, lib, buildEnv, buildGoPackage, fetchFromGitHub, makeWrapper, coreutils
{ stdenv, lib, buildEnv, buildGoModule, fetchFromGitHub, makeWrapper, coreutils
, runCommand, writeText, terraform-providers, fetchpatch }:

let
goPackagePath = "github.com/hashicorp/terraform";

generic = { version, sha256, ... }@attrs:
let attrs' = builtins.removeAttrs attrs [ "version" "sha256" ];
in buildGoPackage ({
in buildGoModule ({
name = "terraform-${version}";

inherit goPackagePath;

src = fetchFromGitHub {
owner = "hashicorp";
Expand Down Expand Up @@ -150,4 +148,4 @@ in rec {
'';
in test;

}
}
7 changes: 3 additions & 4 deletions pkgs/applications/networking/cluster/tilt/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoPackage rec {
buildGoModule rec {
pname = "tilt";
/* Do not use "dev" as a version. If you do, Tilt will consider itself
running in development environment and try to serve assets from the
Expand All @@ -14,7 +14,6 @@ buildGoPackage rec {
sha256 = "035czgr0rn6gcv24vnlr35n9yvy0fwq4spdzsc76gfxckcbcmzz0";
};

goPackagePath = "github.com/windmilleng/tilt";

subPackages = [ "cmd/tilt" ];

Expand All @@ -26,4 +25,4 @@ buildGoPackage rec {
license = licenses.asl20;
maintainers = with maintainers; [ anton-dessiatov ];
};
}
}
7 changes: 3 additions & 4 deletions pkgs/applications/networking/dnscontrol/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{ stdenv, fetchFromGitHub, buildGoPackage}:
{ stdenv, fetchFromGitHub, buildGoModule}:

buildGoPackage rec {
buildGoModule rec {
pname = "dnscontrol";
version = "3.0.0";

goPackagePath = "github.com/StackExchange/dnscontrol";

src = fetchFromGitHub {
owner = "StackExchange";
Expand All @@ -21,4 +20,4 @@ buildGoPackage rec {
license = licenses.mit;
maintainers = with maintainers; [ mmahut ];
};
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub }:

buildGoPackage rec {
buildGoModule rec {
# https://github.com/erroneousboat/slack-term
pname = "slack-term";
version = "0.5.0";

goPackagePath = "github.com/erroneousboat/slack-term";

src = fetchFromGitHub {
owner = "erroneousboat";
Expand All @@ -20,4 +19,4 @@ buildGoPackage rec {
license = licenses.mit;
maintainers = with maintainers; [ dtzWill ];
};
}
}
7 changes: 3 additions & 4 deletions pkgs/applications/networking/sync/rclone/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, buildGoPackage, fetchFromGitHub, buildPackages, installShellFiles }:
{ stdenv, buildGoModule, fetchFromGitHub, buildPackages, installShellFiles }:

buildGoPackage rec {
buildGoModule rec {
pname = "rclone";
version = "1.51.0";

Expand All @@ -11,7 +11,6 @@ buildGoPackage rec {
sha256 = "0z4kaq6wnj5dgl52g7f86phxlvnk5pbpda7prgh3hahpyhxj0z7d";
};

goPackagePath = "github.com/rclone/rclone";

subPackages = [ "." ];

Expand Down Expand Up @@ -41,4 +40,4 @@ buildGoPackage rec {
maintainers = with maintainers; [ danielfullmer ];
platforms = platforms.all;
};
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub }:

buildGoPackage {
buildGoModule {
pname = "git-codereview";
version = "2020-01-15";
goPackagePath = "golang.org/x/review";

src = fetchFromGitHub {
owner = "golang";
Expand All @@ -18,4 +17,4 @@ buildGoPackage {
license = licenses.bsd3;
maintainers = [ maintainers.edef ];
};
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, utillinux }:
{ stdenv, buildGoModule, fetchFromGitHub, groff, installShellFiles, utillinux }:

buildGoPackage rec {
buildGoModule rec {
pname = "hub";
version = "2.14.2";

goPackagePath = "github.com/github/hub";

# Only needed to build the man-pages
excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
Expand All @@ -23,7 +22,6 @@ buildGoPackage rec {
'';

postInstall = ''
cd go/src/${goPackagePath}
installShellCompletion --zsh --name _hub etc/hub.zsh_completion
installShellCompletion --bash --name hub etc/hub.bash_completion.sh
installShellCompletion --fish --name hub.fish etc/hub.fish_completion
Expand All @@ -40,4 +38,4 @@ buildGoPackage rec {
maintainers = with maintainers; [ globin ];
platforms = with platforms; unix;
};
}
}
Loading