forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes NixOS#98458 Updates purpleidea/mgmt#610
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ 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 go-modules | ||
# 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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters