mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
Merge pull request #183876 from NixOS/backport-182937-to-release-22.05
This commit is contained in:
@@ -5,10 +5,9 @@
|
||||
, help2man
|
||||
, pkg-config
|
||||
, texinfo
|
||||
, makeWrapper
|
||||
, boehmgc
|
||||
, readline
|
||||
, guiSupport ? false, tcl, tcllib, tk
|
||||
, guiSupport ? false, makeWrapper, tcl, tcllib, tk
|
||||
, miSupport ? true, json_c
|
||||
, nbdSupport ? !stdenv.isDarwin, libnbd
|
||||
, textStylingSupport ? true
|
||||
@@ -22,14 +21,17 @@ let
|
||||
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "poke";
|
||||
version = "2.3";
|
||||
version = "2.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-NpDPERbafLOp7GtPcAPiU+JotRAhKiiP04qv7Q68x2Y=";
|
||||
sha256 = "sha256-hB4oWRfGc4zpgqaTDjDr6t7PsGVaedkYTxb4dqn+bkc=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "info" "lib" "man" ];
|
||||
outputs = [ "out" "dev" "info" "lib" ]
|
||||
# help2man can't cross compile because it runs `poke --help` to
|
||||
# generate the man page
|
||||
++ lib.optional (!isCross) "man";
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
@@ -39,21 +41,28 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
help2man
|
||||
pkg-config
|
||||
texinfo
|
||||
] ++ lib.optional guiSupport makeWrapper;
|
||||
] ++ lib.optionals (!isCross) [
|
||||
help2man
|
||||
] ++ lib.optionals guiSupport [
|
||||
makeWrapper
|
||||
tcl.tclPackageHook
|
||||
];
|
||||
|
||||
buildInputs = [ boehmgc readline ]
|
||||
++ lib.optionals guiSupport [ tk tcl.tclPackageHook tcllib ]
|
||||
++ lib.optionals guiSupport [ tcl tcllib tk ]
|
||||
++ lib.optional miSupport json_c
|
||||
++ lib.optional nbdSupport libnbd
|
||||
++ lib.optional textStylingSupport gettext
|
||||
++ lib.optional (!isCross) dejagnu;
|
||||
|
||||
configureFlags = [
|
||||
# libpoke depends on $datadir/poke, so we specify the datadir in
|
||||
# $lib, and later move anything else it doesn't depend on to $out
|
||||
"--datadir=${placeholder "lib"}/share"
|
||||
] ++ lib.optionals guiSupport [
|
||||
"--enable-gui"
|
||||
"--with-tcl=${tcl}/lib"
|
||||
"--with-tk=${tk}/lib"
|
||||
"--with-tkinclude=${tk.dev}/include"
|
||||
@@ -66,6 +75,16 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput share/emacs "$out"
|
||||
moveToOutput share/vim "$out"
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString guiSupport ''
|
||||
wrapProgram "$out/bin/poke-gui" \
|
||||
--prefix TCLLIBPATH ' ' "$TCLLIBPATH"
|
||||
|
||||
# Prevent tclPackageHook from auto-wrapping all binaries, we only
|
||||
# need to wrap poke-gui
|
||||
unset TCLLIBPATH
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
@@ -85,10 +104,11 @@ in stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
description = "Interactive, extensible editor for binary data";
|
||||
homepage = "http://www.jemarch.net/poke";
|
||||
changelog = "https://git.savannah.gnu.org/cgit/poke.git/plain/ChangeLog?h=releases/poke-${version}";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres kira-bruneau ];
|
||||
platforms = platforms.unix;
|
||||
changelog = "https://git.savannah.gnu.org/cgit/poke.git/plain/ChangeLog?h=releases/poke-${version}";
|
||||
badPlatforms = [ "aarch64-darwin" ]; # Undefined symbols for architecture arm64
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user