pond: fix build by renaming imports, also add renameImports to goBuildPackage

This commit is contained in:
Luca Bruno 2015-04-16 18:43:09 +02:00
parent a83f55af1c
commit 23a92ba43c
3 changed files with 23 additions and 6 deletions

View File

@ -14,7 +14,12 @@ buildGoPackage rec {
subPackages = [ "client" ]; 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"; buildFlags = "--tags nogui";

View File

@ -1,4 +1,4 @@
{ go }: { go, govers, lib }:
{ name, buildInputs ? [] { name, buildInputs ? []
@ -9,7 +9,7 @@
go.stdenv.mkDerivation ( args // { go.stdenv.mkDerivation ( args // {
name = "go${go.meta.branch}-${name}"; name = "go${go.meta.branch}-${name}";
buildInputs = [ go ] ++ buildInputs; buildInputs = [ go ] ++ buildInputs ++ (lib.optional (args ? renameImports) govers) ;
configurePhase = args.configurePhase or '' configurePhase = args.configurePhase or ''
runHook preConfigure runHook preConfigure
@ -23,9 +23,16 @@ go.stdenv.mkDerivation ( args // {
runHook postConfigure runHook postConfigure
''; '';
renameImports = lib.optionalString (args ? renameImports)
(lib.concatMapStringsSep "\n"
(cmdargs: "govers -m ${cmdargs}")
args.renameImports);
buildPhase = args.buildPhase or '' buildPhase = args.buildPhase or ''
runHook preBuild runHook preBuild
runHook renameImports
if [ -n "$subPackages" ] ; then if [ -n "$subPackages" ] ; then
for p in $subPackages ; do for p in $subPackages ; do
go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $goPackagePath/$p go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $goPackagePath/$p
@ -83,6 +90,7 @@ go.stdenv.mkDerivation ( args // {
meta = meta // { meta = meta // {
# add an extra maintainer to every package # 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 ];
}; };
}) })

View File

@ -8000,7 +8000,9 @@ let
go = go_1_3; go = go_1_3;
buildGoPackage = import ../development/go-modules/generic { buildGoPackage = import ../development/go-modules/generic {
go = go_1_3; go = go_1_3;
}; govers = go13Packages.govers;
inherit lib;
};
overrides = (config.goPackageOverrides or (p: {})) pkgs; overrides = (config.goPackageOverrides or (p: {})) pkgs;
}); });
@ -8008,6 +8010,8 @@ let
go = go_1_4; go = go_1_4;
buildGoPackage = import ../development/go-modules/generic { buildGoPackage = import ../development/go-modules/generic {
go = go_1_4; go = go_1_4;
govers = go14Packages.govers;
inherit lib;
}; };
overrides = (config.goPackageOverrides or (p: {})) pkgs; overrides = (config.goPackageOverrides or (p: {})) pkgs;
}); });
@ -11605,7 +11609,7 @@ let
inherit (xorg) libXpm; inherit (xorg) libXpm;
}; };
pond = callPackage ../applications/networking/pond { goPackages = go13Packages; }; pond = callPackage ../applications/networking/pond { goPackages = go14Packages; };
potrace = callPackage ../applications/graphics/potrace {}; potrace = callPackage ../applications/graphics/potrace {};