nixpkgs-suyu/pkgs/applications/editors/poke/default.nix

79 lines
1.8 KiB
Nix
Raw Normal View History

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