1{ stdenv, fetchgit, libX11 }:
2
3stdenv.mkDerivation {
4 name = "disk-indicator-2014-05-19";
5
6 src = fetchgit {
7 url = git://github.com/MeanEYE/Disk-Indicator.git;
8 rev = "51ef4afd8141b8d0659cbc7dc62189c56ae9c2da";
9 sha256 = "0f8mxl3wqlap8zajdk6r9liliayp8w4xs4jy8jbwanmmppwz0nb9";
10 };
11
12 buildInputs = [ libX11 ];
13
14 patchPhase = ''
15 substituteInPlace ./makefile --replace "COMPILER=c99" "COMPILER=gcc -std=c99"
16 substituteInPlace ./makefile --replace "COMPILE_FLAGS=" "COMPILE_FLAGS=-O2 "
17 '';
18
19 buildPhase = "make -f makefile";
20
21 NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
22
23 installPhase = ''
24 mkdir -p "$out/bin"
25 cp ./disk_indicator "$out/bin/"
26 '';
27
28 meta = {
29 homepage = https://github.com/MeanEYE/Disk-Indicator;
30 description = "A program that will turn a LED into a hard disk indicator";
31 longDescription = ''
32 Small program for Linux that will turn your Scroll, Caps or Num Lock LED
33 or LED on your ThinkPad laptop into a hard disk activity indicator.
34 '';
35 license = stdenv.lib.licenses.gpl3;
36 platforms = stdenv.lib.platforms.linux;
37 };
38}