summary refs log tree commit diff
path: root/pkgs/applications/editors/heme/default.nix
blob: d377e5cb36f67f3ee4a40be71d3b73158c6e8c6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, lib, fetchurl, ncurses }:

stdenv.mkDerivation rec {
  name = "heme-${version}";
  version = "0.4.2";
  src = fetchurl {
    url = "http://downloads.sourceforge.net/project/heme/heme/heme-${version}/heme-${version}.tar.gz";
    sha256 = "0wsrnj5mrlazgqs4252k30aw8m86qw0z9dmrsli9zdxl7j4cg99v";
  };
  postPatch = ''
    substituteInPlace Makefile \
      --replace "/usr/local" "$out" \
      --replace "CFLAGS = " "CFLAGS = -I${ncurses}/include " \
      --replace "LDFLAGS = " "LDFLAGS = -L${ncurses}/lib " \
      --replace "-lcurses" "-lncurses"
  '';
  preBuild = ''
    mkdir -p $out/bin
    mkdir -p $out/man/man1
  '';
  meta = with lib; {
    description = "Portable and fast console hex editor for unix operating systems";
    homepage = "http://heme.sourceforge.net/";
    license = licenses.gpl2;
    platforms = platforms.linux;
    maintainers = with maintainers; [ cstrahan ];
  };
}