Merge pull request #198963 from urandom2/mgmt
Fixes https://github.com/NixOS/nixpkgs/issues/98458
This commit is contained in:
commit
ede482331b
67
pkgs/applications/system/mgmt/default.nix
Normal file
67
pkgs/applications/system/mgmt/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
27
pkgs/development/tools/parsing/nex/default.nix
Normal file
27
pkgs/development/tools/parsing/nex/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ buildGoPackage
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
}:
|
||||
# upstream is pretty stale, but it still works, so until they merge module
|
||||
# support we have to use gopath: see blynn/nex#57
|
||||
buildGoPackage rec {
|
||||
pname = "nex";
|
||||
version = "unstable-2021-03-30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "blynn";
|
||||
repo = pname;
|
||||
rev = "1a3320dab988372f8910ccc838a6a7a45c8980ff";
|
||||
hash = "sha256-DtJkV380T2B5j0+u7lYZfbC0ej0udF4GW2lbRmmbjAM=";
|
||||
};
|
||||
|
||||
goPackagePath = "github.com/blynn/nex";
|
||||
subPackages = [ "." ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Lexer for Go";
|
||||
homepage = "https://github.com/blynn/nex";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ urandom ];
|
||||
};
|
||||
}
|
|
@ -1431,6 +1431,8 @@ with pkgs;
|
|||
|
||||
mnc = callPackage ../tools/misc/mnc { };
|
||||
|
||||
mgmt = callPackage ../applications/system/mgmt {};
|
||||
|
||||
mprocs = callPackage ../tools/misc/mprocs { };
|
||||
|
||||
nominatim = callPackage ../servers/nominatim { };
|
||||
|
@ -17845,6 +17847,8 @@ with pkgs;
|
|||
|
||||
nap = callPackage ../development/tools/nap { };
|
||||
|
||||
nex = callPackage ../development/tools/parsing/nex {};
|
||||
|
||||
ninja = callPackage ../development/tools/build-managers/ninja { };
|
||||
|
||||
nimbo = with python3Packages; callPackage ../applications/misc/nimbo { };
|
||||
|
|
Loading…
Reference in a new issue