1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-24 18:16:21 +03:00

xastir: fix cross, enable strictDeps, update meta, modernize

This commit is contained in:
FliegendeWurst 2025-04-25 00:02:33 +02:00 committed by Emery Hemingway
parent b980efdc1a
commit b0c0ca03a7

View file

@ -4,9 +4,12 @@
fetchFromGitHub, fetchFromGitHub,
autoreconfHook, autoreconfHook,
pkg-config, pkg-config,
bashNonInteractive,
curl, curl,
db, db,
gnused,
libgeotiff, libgeotiff,
libtiff,
xorg, xorg,
motif, motif,
pcre2, pcre2,
@ -24,19 +27,22 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xastir"; owner = "xastir";
repo = "xastir"; repo = "xastir";
rev = "Release-${version}"; tag = "Release-${version}";
hash = "sha256-EQXSfH4b5vMiprFcMXCUDNl+R1cHSj9CyhZnUPAMoCw="; hash = "sha256-EQXSfH4b5vMiprFcMXCUDNl+R1cHSj9CyhZnUPAMoCw=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
autoreconfHook autoreconfHook
pkg-config pkg-config
perl
]; ];
buildInputs = [ buildInputs = [
bashNonInteractive
curl curl
db db
libgeotiff libgeotiff
libtiff
xorg.libXpm xorg.libXpm
xorg.libXt xorg.libXt
motif motif
@ -48,15 +54,41 @@ stdenv.mkDerivation rec {
libax25 libax25
]; ];
configureFlags = [ "--with-motif-includes=${motif}/include" ]; strictDeps = true;
postPatch = "patchShebangs ."; configureFlags = [
"--with-motif-includes=${lib.getDev motif}/include"
"ac_cv_path_gm=${lib.getExe' graphicsmagick "gm"}"
"ac_cv_path_convert=${lib.getExe' graphicsmagick "convert"}"
"ac_cv_header_xtiffio_h=yes"
"ac_cv_path_GMAGIC_BIN=${lib.getExe' (lib.getDev graphicsmagick) "GraphicsMagick-config"}"
];
meta = with lib; { makeFlags = [
"AR=${stdenv.cc.targetPrefix}ar"
];
postPatch = ''
patchShebangs --build scripts/lang*.pl
# checks for files in /usr/bin/
substituteInPlace acinclude.m4 \
--replace-fail "AC_CHECK_FILE" "# AC_CHECK_FILE"
# would pick up builder sed from $PATH
substituteInPlace configure.ac \
--replace-fail 'AC_DEFINE_UNQUOTED(SED_PATH, "''${sed}", [Path to sed])' \
'AC_DEFINE_UNQUOTED(SED_PATH, "${lib.getExe gnused}", [Path to sed])'
'';
preInstall = ''
patchShebangs --host --update .
'';
meta = {
description = "Graphical APRS client"; description = "Graphical APRS client";
homepage = "https://xastir.org"; homepage = "https://github.com/xastir/xastir";
license = licenses.gpl2; license = lib.licenses.gpl2Plus;
maintainers = [ maintainers.ehmry ]; maintainers = [ lib.maintainers.ehmry ];
platforms = platforms.linux; platforms = lib.platforms.linux;
}; };
} }