mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
1c29673fcc
In 787af0f79f
I had to change ${go-modules} to $goModules to allow overrideAttrs to work;
However, env vars cannot contain -, so i had to change go-modules too.
This in turn broke nix-update because it uses the go-modules attr.
Instead of making nix-update more complicated, make go-modules naming match cargoDeps.
`fd --type f | xargs sd '\bgo-modules\b' 'goModules'`
and revert change to pkgs/applications/misc/dstask/default.nix
and pkgs/servers/http/dave/default.nix
and pkgs/os-specific/darwin/plistwatch/default.nix
release note added
41 lines
950 B
Nix
41 lines
950 B
Nix
{ stdenv, buildGoModule, fetchFromGitHub, lib
|
||
, enableStatic ? stdenv.hostPlatform.isStatic
|
||
}:
|
||
|
||
buildGoModule rec {
|
||
pname = "gobetween";
|
||
version = "0.8.0";
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "yyyar";
|
||
repo = "gobetween";
|
||
rev = version;
|
||
sha256 = "0bxf89l53sqan9qq23rwawjkcanv9p61sw56zjqhyx78f0bh0zbc";
|
||
};
|
||
|
||
patches = [
|
||
./gomod.patch
|
||
];
|
||
|
||
buildPhase = ''
|
||
make -e build${lib.optionalString enableStatic "-static"}
|
||
'';
|
||
|
||
vendorSha256 = null; #vendorSha256 = "";
|
||
|
||
installPhase = ''
|
||
mkdir -p $out/bin
|
||
cp bin/gobetween $out/bin
|
||
cp -r share $out/share
|
||
cp -r config $out/share
|
||
'';
|
||
|
||
meta = with lib; {
|
||
description = "Modern & minimalistic load balancer for the Сloud era";
|
||
homepage = "https://gobetween.io";
|
||
license = licenses.mit;
|
||
maintainers = with maintainers; [ tomberek ];
|
||
broken = true; # vendor isn't reproducible with go > 1.17: nix-build -A $name.goModules --check
|
||
};
|
||
}
|