Merge pull request #114523 from MetaDark/poke

poke: init at 1.0
This commit is contained in:
Mario Rodas 2021-03-01 21:37:24 -05:00 committed by GitHub
commit 66d7cb4fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,74 @@
{ lib
, stdenv
, fetchurl
, gettext
, help2man
, pkg-config
, texinfo
, makeWrapper
, boehmgc
, readline
, guiSupport ? false, tcl, tcllib, tk
, miSupport ? true, json_c
, nbdSupport ? true, libnbd
, textStylingSupport ? true
, dejagnu
}:
let
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
in stdenv.mkDerivation rec {
pname = "poke";
version = "1.0";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
hash = "sha256-3pMLhwDAdys8LNDQyjX1D9PXe9+CxiUetRa0noyiWwo=";
};
postPatch = ''
patchShebangs .
'';
strictDeps = true;
nativeBuildInputs = [
gettext
help2man
pkg-config
texinfo
] ++ lib.optional guiSupport makeWrapper;
buildInputs = [ boehmgc readline ]
++ lib.optional guiSupport tk
++ lib.optional miSupport json_c
++ lib.optional nbdSupport libnbd
++ lib.optional textStylingSupport gettext
++ lib.optional (!isCross) dejagnu;
configureFlags = lib.optionals guiSupport [
"--with-tcl=${tcl}/lib"
"--with-tk=${tk}/lib"
"--with-tkinclude=${tk.dev}/include"
];
enableParallelBuilding = true;
doCheck = !isCross;
checkInputs = lib.optionals (!isCross) [ dejagnu ];
postFixup = lib.optionalString guiSupport ''
wrapProgram "$out/bin/poke-gui" \
--prefix TCLLIBPATH ' ' ${tcllib}/lib/tcllib${tcllib.version}
'';
meta = with lib; {
description = "Interactive, extensible editor for binary data";
homepage = "http://www.jemarch.net/poke";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres metadark ];
platforms = platforms.unix;
};
}
# TODO: Enable guiSupport by default once it's more than just a stub

View File

@ -24574,6 +24574,8 @@ in
plugin-torture = callPackage ../applications/audio/plugin-torture { };
poke = callPackage ../applications/editors/poke { };
polar-bookshelf = callPackage ../applications/misc/polar-bookshelf { };
poezio = python3Packages.poezio;