diff --git a/pkgs/applications/networking/pond/default.nix b/pkgs/applications/networking/pond/default.nix index 59e381e9e222..4ac3a0448dea 100644 --- a/pkgs/applications/networking/pond/default.nix +++ b/pkgs/applications/networking/pond/default.nix @@ -14,7 +14,12 @@ buildGoPackage rec { subPackages = [ "client" ]; - buildInputs = [ trousers net crypto protobuf ed25519 ]; + renameImports = [ + "code.google.com/p/go.crypto golang.org/x/crypto" + "code.google.com/p/goprotobuf github.com/golang/protobuf" + ]; + + buildInputs = [ trousers net crypto protobuf ed25519 govers ]; buildFlags = "--tags nogui"; diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 8fed5a55be06..76828784a9d5 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -1,4 +1,4 @@ -{ go }: +{ go, govers, lib }: { name, buildInputs ? [] @@ -9,7 +9,7 @@ go.stdenv.mkDerivation ( args // { name = "go${go.meta.branch}-${name}"; - buildInputs = [ go ] ++ buildInputs; + buildInputs = [ go ] ++ buildInputs ++ (lib.optional (args ? renameImports) govers) ; configurePhase = args.configurePhase or '' runHook preConfigure @@ -23,9 +23,16 @@ go.stdenv.mkDerivation ( args // { runHook postConfigure ''; + renameImports = lib.optionalString (args ? renameImports) + (lib.concatMapStringsSep "\n" + (cmdargs: "govers -m ${cmdargs}") + args.renameImports); + buildPhase = args.buildPhase or '' runHook preBuild + runHook renameImports + if [ -n "$subPackages" ] ; then for p in $subPackages ; do go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $goPackagePath/$p @@ -83,6 +90,7 @@ go.stdenv.mkDerivation ( args // { meta = meta // { # add an extra maintainer to every package - maintainers = (meta.maintainers or []) ++ [ go.stdenv.lib.maintainers.emery ]; + maintainers = (meta.maintainers or []) ++ + [ lib.maintainers.emery lib.maintainers.lethalman ]; }; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 904347586876..8f8855e23ff3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8000,7 +8000,9 @@ let go = go_1_3; buildGoPackage = import ../development/go-modules/generic { go = go_1_3; - }; + govers = go13Packages.govers; + inherit lib; + }; overrides = (config.goPackageOverrides or (p: {})) pkgs; }); @@ -8008,6 +8010,8 @@ let go = go_1_4; buildGoPackage = import ../development/go-modules/generic { go = go_1_4; + govers = go14Packages.govers; + inherit lib; }; overrides = (config.goPackageOverrides or (p: {})) pkgs; }); @@ -11605,7 +11609,7 @@ let inherit (xorg) libXpm; }; - pond = callPackage ../applications/networking/pond { goPackages = go13Packages; }; + pond = callPackage ../applications/networking/pond { goPackages = go14Packages; }; potrace = callPackage ../applications/graphics/potrace {};