mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
pond: fix build by renaming imports, also add renameImports to goBuildPackage
This commit is contained in:
parent
a83f55af1c
commit
23a92ba43c
@ -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";
|
||||
|
||||
|
@ -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 ];
|
||||
};
|
||||
})
|
||||
|
@ -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 {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user