@@ -0,0 +1,27 @@
1+{ stdenv, lib, fetchurl, ncurses }:
2+
3+stdenv.mkDerivation rec {
4+ name = "heme-${version}";
5+ version = "0.4.2";
6+ src = fetchurl {
7+ url = "http://downloads.sourceforge.net/project/heme/heme/heme-${version}/heme-${version}.tar.gz";
8+ sha256 = "0wsrnj5mrlazgqs4252k30aw8m86qw0z9dmrsli9zdxl7j4cg99v";
9+ };
10+ postPatch = ''
11+ substituteInPlace Makefile \
12+ --replace "/usr/local" "$out" \
13+ --replace "CFLAGS = " "CFLAGS = -I${ncurses}/include " \
14+ --replace "LDFLAGS = " "LDFLAGS = -L${ncurses}/lib "
15+ '';
16+ preBuild = ''
17+ mkdir -p $out/bin
18+ mkdir -p $out/man/man1
19+ '';
20+ meta = with lib; {
21+ description = "Portable and fast console hex editor for unix operating systems";
22+ homepage = "http://heme.sourceforge.net/";
23+ license = licenses.gpl2;
24+ platforms = platforms.linux;
25+ maintainers = with maintainers; [ cstrahan ];
26+ };
27+}