Files
nixpkgs/pkgs/by-name/fi/fim/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

103 lines
2.4 KiB
Nix

{
stdenv,
fetchurl,
autoconf,
automake,
pkg-config,
replaceVars,
lib,
perl,
flex,
bison,
readline,
libexif,
bash,
buildPackages,
# SDL depends on Qt, which doesn't cross-compile
x11Support ? (stdenv.buildPlatform.canExecute stdenv.hostPlatform),
SDL,
svgSupport ? true,
inkscape,
asciiArtSupport ? true,
aalib,
gifSupport ? true,
giflib,
tiffSupport ? true,
libtiff,
jpegSupport ? true,
libjpeg,
pngSupport ? true,
libpng,
}:
stdenv.mkDerivation rec {
pname = "fim";
version = "0.7";
src = fetchurl {
url = "mirror://savannah/fbi-improved/${pname}-${version}-trunk.tar.gz";
sha256 = "sha256-/p7bjeZM46DJOQ9sgtebhkNpBPj2RJYY3dMXhzHnNmg=";
};
patches = [
# build tools with a build compiler
(replaceVars ./native-tools.patch {
cc_for_build = lib.getExe buildPackages.stdenv.cc;
# patch context
FIM_WANT_CUSTOM_HARDCODED_CONSOLEFONT_TRUE = null;
HAVE_RUNNABLE_TESTS_TRUE = null;
})
];
postPatch = ''
patchShebangs --build doc/vim2html.pl
'';
nativeBuildInputs = [
autoconf
automake
bison
flex
perl
pkg-config
];
buildInputs = [
flex
readline
libexif
bash
]
++ lib.optional x11Support SDL
++ lib.optional svgSupport inkscape
++ lib.optional asciiArtSupport aalib
++ lib.optional gifSupport giflib
++ lib.optional tiffSupport libtiff
++ lib.optional jpegSupport libjpeg
++ lib.optional pngSupport libpng;
configureFlags = [
# mmap works on all relevant platforms
"ac_cv_func_mmap_fixed_mapped=yes"
# system regexp works on all relevant platforms
"fim_cv_regex_broken=no"
];
env.LIBAA_CONFIG = lib.getExe' (lib.getDev aalib) "aalib-config";
env.LIBPNG_CONFIG = lib.getExe' (lib.getDev libpng) "libpng-config";
env.NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-lSDL";
meta = with lib; {
description = "Lightweight, highly customizable and scriptable image viewer";
longDescription = ''
FIM (Fbi IMproved) is a lightweight, console based image viewer that aims
to be a highly customizable and scriptable for users who are comfortable
with software like the VIM text editor or the Mutt mail user agent.
'';
homepage = "https://www.nongnu.org/fbi-improved/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ ];
};
}