about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/heme/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/heme/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/editors/heme/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/editors/heme/default.nix b/nixpkgs/pkgs/applications/editors/heme/default.nix
new file mode 100644
index 000000000000..7d1830c842b6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/editors/heme/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchurl, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "heme";
+  version = "0.4.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/project/heme/heme/heme-${version}/heme-${version}.tar.gz";
+    sha256 = "0wsrnj5mrlazgqs4252k30aw8m86qw0z9dmrsli9zdxl7j4cg99v";
+  };
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "/usr/local" "$out" \
+      --replace "CFLAGS = " "CFLAGS = -I${ncurses.dev}/include " \
+      --replace "LDFLAGS = " "LDFLAGS = -L${ncurses.out}/lib " \
+      --replace "-lcurses" "-lncurses"
+  '';
+  buildInputs = [ ncurses ];
+  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 ];
+  };
+}