nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 68 lines 1.4 kB view raw
1{ 2 augeas, 3 buildGoModule, 4 fetchFromGitHub, 5 gotools, 6 lib, 7 libvirt, 8 libxml2, 9 nex, 10 pkg-config, 11 ragel, 12}: 13buildGoModule rec { 14 pname = "mgmt"; 15 version = "unstable-2022-10-24"; 16 17 src = fetchFromGitHub { 18 owner = "purpleidea"; 19 repo = "mgmt"; 20 rev = "d8820fa1855668d9e0f7a7829d9dd0d122b2c5a9"; 21 hash = "sha256-jurZvEtiaTjWeDkmCJDIFlTzR5EVglfoDxkFgOilo8s="; 22 }; 23 24 # patching must be done in prebuild, so it is shared with goModules 25 # see https://github.com/NixOS/nixpkgs/issues/208036 26 preBuild = '' 27 for file in `find -name Makefile -type f`; do 28 substituteInPlace $file --replace "/usr/bin/env " "" 29 done 30 31 substituteInPlace lang/types/Makefile \ 32 --replace "unset GOCACHE && " "" 33 patchShebangs misc/header.sh 34 make lang funcgen 35 ''; 36 37 buildInputs = [ 38 augeas 39 libvirt 40 libxml2 41 ]; 42 43 nativeBuildInputs = [ 44 gotools 45 nex 46 pkg-config 47 ragel 48 ]; 49 50 ldflags = [ 51 "-s" 52 "-w" 53 "-X main.program=mgmt" 54 "-X main.version=${version}" 55 ]; 56 57 subPackages = [ "." ]; 58 59 vendorHash = "sha256-Dtqy4TILN+7JXiHKHDdjzRTsT8jZYG5sPudxhd8znXY="; 60 61 meta = with lib; { 62 description = "Next generation distributed, event-driven, parallel config management"; 63 homepage = "https://mgmtconfig.com"; 64 license = licenses.gpl3Only; 65 maintainers = with maintainers; [ urandom ]; 66 mainProgram = "mgmt"; 67 }; 68}