summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/system
diff options
context:
space:
mode:
authorColin Arnott <colin@urandom.co.uk>2022-11-01 14:15:57 +0000
committerColin Arnott <colin@urandom.co.uk>2023-01-04 02:09:01 +0000
commitbb0323856c995614679ea507f8ec01b1fcbebfe5 (patch)
treea94b45016e6307a51ef1e514d94e8cb9a640a99f /pkgs/applications/system
parent9025e3da4c14220a120399f37e7d71e025d69f4a (diff)
mgmt: init at unstable-2022-10-24
Fixes #98458 Updates purpleidea/mgmt#610
Diffstat (limited to 'pkgs/applications/system')
-rw-r--r--pkgs/applications/system/mgmt/default.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/applications/system/mgmt/default.nix b/pkgs/applications/system/mgmt/default.nix
new file mode 100644
index 000000000000..0bc65dc95052
--- /dev/null
+++ b/pkgs/applications/system/mgmt/default.nix
@@ -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 ];
+ };
+}