Change:
Project description mgmt: next generation config management! Metadata homepage URL: source URL: license: GNU3 platforms: unix, linux, darwin
After fixing up the mgmt make scripts , from !/bin/bash to !/usr/bin/env bash trying to build from 'nix-shell -p go git' git clone cd mgmt make path make deps make Building: mgmt, os/arch: linux-amd64, version: 0.0.21-90-g5c6a66e-dirty... go build runtime/cgo: copying /run/user/1000/go-build892927552/b057/pkg.a: open /nix/store/y2nrzzz2yz7k36xvwr7bbfx76cb8jg16-go-1.14.8/share/go/pkg/linuxamd64/runtime/cgo.a: read-only file system make: * [Makefile:175: build/mgmt-linux-amd64] Error 1 go env GO111MODULE="" GOARCH="amd64" GOBIN="/home/demo/gopath/bin/" GOCACHE="" GOENV="" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/demo/gopath/" GOPRIVATE="" GOPROXY=",direct" GOROOT="/nix/store/y2nrzzz2yz7k36xvwr7bbfx76cb8jg16-go-1.14.8/share/go" GOSUMDB="" GOTMPDIR="" GOTOOLDIR="/nix/store/y2nrzzz2yz7k36xvwr7bbfx76cb8jg16-go-1.14.8/share/go/pkg/tool/linuxamd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGOENABLED="1" GOMOD="" CGOCFLAGS="-g -O2" CGOCPPFLAGS="" CGOCXXFLAGS="-g -O2" CGOFFLAGS="-g -O2" CGOLDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/run/user/1000/go-build275716735=/tmp/go-build -gno-record-gcc-switches"
mgmt now compiles under a I'm going to need a little bit of help to turn this into a nix package, as i'm not too sure how to handle it , as there are buildgopackage, buildgomodule , vgo2nix etc etc . Any pointers welcomed. to avoid I had to remove the -i from the go build this seems to be related to this NixOS/nixpkgs golang/go to run
I marked this as stale due to inactivity. &rarr;

Discussion:
<ins> { 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 ]; }; } </ins>

<ins> { 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 ]; }; } </ins>

mnc = callPackage ../tools/misc/mnc { }; <ins> mgmt = callPackage ../applications/system/mgmt {}; </ins> mprocs = callPackage ../tools/misc/mprocs { }; nominatim = callPackage ../servers/nominatim { };

nap = callPackage ../development/tools/nap { }; <ins> nex = callPackage ../development/tools/parsing/nex {}; </ins> ninja = callPackage ../development/tools/build-managers/ninja { }; nimbo = with python3Packages; callPackage ../applications/misc/nimbo { };