Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 39 lines 852 B view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 nixosTests, 6}: 7 8buildGoModule rec { 9 pname = "idrac_exporter"; 10 version = "unstable-2023-06-29"; 11 12 src = fetchFromGitHub { 13 owner = "mrlhansen"; 14 repo = "idrac_exporter"; 15 rev = "3b311e0e6d602fb0938267287f425f341fbf11da"; 16 sha256 = "sha256-N8wSjQE25TCXg/+JTsvQk3fjTBgfXTiSGHwZWFDmFKc="; 17 }; 18 19 vendorHash = "sha256-iNV4VrdQONq7LXwAc6AaUROHy8TmmloUAL8EmuPtF/o="; 20 21 patches = [ ./idrac-exporter/config-from-environment.patch ]; 22 23 ldflags = [ 24 "-s" 25 "-w" 26 ]; 27 28 doCheck = true; 29 30 passthru.tests = { inherit (nixosTests.prometheus-exporters) idrac; }; 31 32 meta = with lib; { 33 inherit (src.meta) homepage; 34 description = "Simple iDRAC exporter for Prometheus"; 35 mainProgram = "idrac_exporter"; 36 license = licenses.mit; 37 maintainers = with maintainers; [ codec ]; 38 }; 39}