@@ -0,0 +1,32 @@
1+{ stdenv, fetchFromGitHub, udev, sg3_utils }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "ledmon";
5+ version = "0.92";
6+
7+ src = fetchFromGitHub {
8+ owner = "intel";
9+ repo = "ledmon";
10+ rev = "v${version}";
11+ sha256 = "1lz59606vf2sws5xwijxyffm8kxcf8p9qbdpczsq1b5mm3dk6lvp";
12+ };
13+
14+ buildInputs = [ udev sg3_utils ];
15+
16+ installTargets = [ "install" "install-systemd" ];
17+
18+ makeFlags = [
19+ "MAN_INSTDIR=${placeholder "out"}/share/man"
20+ "SYSTEMD_SERVICE_INSTDIR=${placeholder "out"}/lib/systemd/system"
21+ "LEDCTL_INSTDIR=${placeholder "out"}/sbin"
22+ "LEDMON_INSTDIR=${placeholder "out"}/sbin"
23+ ];
24+
25+ meta = with stdenv.lib; {
26+ homepage = https://github.com/intel/ledmon;
27+ description = "Enclosure LED Utilities";
28+ platforms = platforms.linux;
29+ license = with licenses; [ gpl2 ];
30+ maintainers = with stdenv.lib.maintainers; [ sorki ];
31+ };
32+}