From ffc79cb73bd3618785587543fc2cf7662e90ff0b Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Tue, 1 Nov 2022 14:15:57 +0000 Subject: [PATCH] mgmt: init at unstable-2022-10-24 Fixes #98458 Updates purpleidea/mgmt#610 --- pkgs/applications/system/mgmt/default.nix | 73 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 75 insertions(+) create mode 100644 pkgs/applications/system/mgmt/default.nix diff --git a/pkgs/applications/system/mgmt/default.nix b/pkgs/applications/system/mgmt/default.nix new file mode 100644 index 000000000000000..189f904da1636dd --- /dev/null +++ b/pkgs/applications/system/mgmt/default.nix @@ -0,0 +1,73 @@ +{ augeas +, bash +, 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="; + }; + + postPatch = '' + substituteInPlace Makefile --replace "/usr/bin/env " "" + substituteInPlace examples/dhcp_client/Makefile --replace "/usr/bin/env " "" + substituteInPlace lang/Makefile --replace "/usr/bin/env " "" + substituteInPlace lang/fuzz/Makefile --replace "/usr/bin/env " "" + substituteInPlace lang/types/Makefile \ + --replace "/usr/bin/env " "" \ + --replace "unset GOCACHE && " "" + substituteInPlace misc/mkosi/Makefile --replace "/usr/bin/env " "" + substituteInPlace test/Makefile --replace "/usr/bin/env " "" + patchShebangs misc/header.sh + ''; + + preBuild = '' + make lang funcgen + ''; + + buildInputs = [ + augeas + libvirt + libxml2 + ]; + + nativeBuildInputs = [ + bash + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9f31cacdcafeaee..66ac06cada6ed80 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1419,6 +1419,8 @@ with pkgs; mnc = callPackage ../tools/misc/mnc { }; + mgmt = callPackage ../applications/system/mgmt {}; + mprocs = callPackage ../tools/misc/mprocs { }; nominatim = callPackage ../servers/nominatim { };