nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 ncurses,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "dhex";
10 version = "0.69";
11
12 src = fetchurl {
13 url = "http://www.dettus.net/dhex/dhex_${finalAttrs.version}.tar.gz";
14 sha256 = "06y4lrp29f2fh303ijk1xhspa1d4x4dm6hnyw3dd8szi3k6hnwsj";
15 };
16
17 postPatch = ''
18 # Fix build for gcc>=15
19 substituteInPlace ./output.h --replace-fail 'void initcolors();' 'void initcolors(tOutput*);'
20 '';
21
22 buildInputs = [ ncurses ];
23
24 installPhase = ''
25 mkdir -p $out/bin
26 mkdir -p $out/share/man/man1
27 mkdir -p $out/share/man/man5
28
29 cp dhex $out/bin
30 cp dhex.1 $out/share/man/man1
31 cp dhexrc.5 $out/share/man/man5
32 cp dhex_markers.5 $out/share/man/man5
33 cp dhex_searchlog.5 $out/share/man/man5
34 '';
35
36 meta = {
37 description = "Themeable hex editor with diff mode";
38 homepage = "http://www.dettus.net/dhex/";
39 license = lib.licenses.gpl2;
40 maintainers = with lib.maintainers; [ qknight ];
41 platforms = with lib.platforms; linux;
42 mainProgram = "dhex";
43 };
44})