mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 17:53:37 +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
68 lines
1.3 KiB
Nix
68 lines
1.3 KiB
Nix
{ augeas
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, gotools
|
|
, lib
|
|
, libvirt
|
|
, libxml2
|
|
, nex
|
|
, pkg-config
|
|
, ragel
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "mgmt";
|
|
version = "unstable-2022-10-24";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "purpleidea";
|
|
repo = pname;
|
|
rev = "d8820fa1855668d9e0f7a7829d9dd0d122b2c5a9";
|
|
hash = "sha256-jurZvEtiaTjWeDkmCJDIFlTzR5EVglfoDxkFgOilo8s=";
|
|
};
|
|
|
|
# patching must be done in prebuild, so it is shared with goModules
|
|
# see https://github.com/NixOS/nixpkgs/issues/208036
|
|
preBuild = ''
|
|
for file in `find -name Makefile -type f`; do
|
|
substituteInPlace $file --replace "/usr/bin/env " ""
|
|
done
|
|
|
|
substituteInPlace lang/types/Makefile \
|
|
--replace "unset GOCACHE && " ""
|
|
patchShebangs misc/header.sh
|
|
make lang funcgen
|
|
'';
|
|
|
|
buildInputs = [
|
|
augeas
|
|
libvirt
|
|
libxml2
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
gotools
|
|
nex
|
|
pkg-config
|
|
ragel
|
|
];
|
|
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.program=${pname}"
|
|
"-X main.version=${version}"
|
|
];
|
|
|
|
subPackages = [ "." ];
|
|
|
|
vendorHash = "sha256-Dtqy4TILN+7JXiHKHDdjzRTsT8jZYG5sPudxhd8znXY=";
|
|
|
|
meta = with lib; {
|
|
description = "Next generation distributed, event-driven, parallel config management!";
|
|
homepage = "https://mgmtconfig.com";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ urandom ];
|
|
};
|
|
}
|