1{
2 lib,
3 stdenv,
4 fetchurl,
5 ncurses,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "tweak";
10 version = "3.02";
11
12 src = fetchurl {
13 url = "https://www.chiark.greenend.org.uk/~sgtatham/tweak/${pname}-${version}.tar.gz";
14 sha256 = "06js54pr5hwpwyxj77zs5s40n5aqvaw48dkj7rid2d47pyqijk2v";
15 };
16
17 buildInputs = [ ncurses ];
18 preBuild = "substituteInPlace Makefile --replace '$(DESTDIR)/usr/local' $out";
19 makeFlags = [
20 "CC:=$(CC)"
21 "LINK:=$(CC)"
22 ];
23
24 meta = with lib; {
25 description = "Efficient hex editor";
26 homepage = "http://www.chiark.greenend.org.uk/~sgtatham/tweak";
27 license = licenses.mit;
28 platforms = platforms.unix;
29 mainProgram = "tweak";
30 };
31}