2021-02-27 01:43:34 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, gettext
|
|
|
|
, help2man
|
|
|
|
, pkg-config
|
|
|
|
, texinfo
|
|
|
|
, makeWrapper
|
|
|
|
, boehmgc
|
|
|
|
, readline
|
|
|
|
, guiSupport ? false, tcl, tcllib, tk
|
|
|
|
, miSupport ? true, json_c
|
2021-03-20 11:41:01 +00:00
|
|
|
, nbdSupport ? !stdenv.isDarwin, libnbd
|
2021-02-27 01:43:34 +00:00
|
|
|
, textStylingSupport ? true
|
|
|
|
, dejagnu
|
|
|
|
}:
|
|
|
|
|
2021-02-27 12:10:30 +00:00
|
|
|
let
|
|
|
|
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
|
|
|
|
in stdenv.mkDerivation rec {
|
2021-02-27 01:43:34 +00:00
|
|
|
pname = "poke";
|
2021-06-16 13:22:21 +01:00
|
|
|
version = "1.3";
|
2021-02-27 01:43:34 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
|
2021-06-16 13:22:21 +01:00
|
|
|
hash = "sha256-unhjA0obCABLDuj4i9qUFgcH6aeB1VVvVVtQdYPPDxs=";
|
2021-02-27 01:43:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
help2man
|
|
|
|
pkg-config
|
|
|
|
texinfo
|
|
|
|
] ++ lib.optional guiSupport makeWrapper;
|
|
|
|
|
2021-02-27 12:10:30 +00:00
|
|
|
buildInputs = [ boehmgc readline ]
|
2021-05-11 16:15:36 +01:00
|
|
|
++ lib.optionals guiSupport [ tk tcl.tclPackageHook tcllib ]
|
2021-02-27 01:43:34 +00:00
|
|
|
++ lib.optional miSupport json_c
|
|
|
|
++ lib.optional nbdSupport libnbd
|
2021-02-27 12:10:30 +00:00
|
|
|
++ lib.optional textStylingSupport gettext
|
|
|
|
++ lib.optional (!isCross) dejagnu;
|
2021-02-27 01:43:34 +00:00
|
|
|
|
|
|
|
configureFlags = lib.optionals guiSupport [
|
|
|
|
"--with-tcl=${tcl}/lib"
|
|
|
|
"--with-tk=${tk}/lib"
|
|
|
|
"--with-tkinclude=${tk.dev}/include"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-27 12:10:30 +00:00
|
|
|
doCheck = !isCross;
|
|
|
|
checkInputs = lib.optionals (!isCross) [ dejagnu ];
|
2021-02-27 01:43:34 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Interactive, extensible editor for binary data";
|
|
|
|
homepage = "http://www.jemarch.net/poke";
|
|
|
|
license = licenses.gpl3Plus;
|
2021-05-22 15:47:40 +01:00
|
|
|
maintainers = with maintainers; [ AndersonTorres kira-bruneau ];
|
2021-02-27 01:43:34 +00:00
|
|
|
platforms = platforms.unix;
|
2021-03-23 17:36:02 +00:00
|
|
|
changelog = "https://git.savannah.gnu.org/cgit/poke.git/plain/ChangeLog?h=releases/poke-${version}";
|
2021-02-27 01:43:34 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
# TODO: Enable guiSupport by default once it's more than just a stub
|