nixpkgs/pkgs/by-name/fi/fim/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

53 lines
1.6 KiB
Nix

{ stdenv, fetchurl, autoconf, automake, pkg-config, lib
, perl, flex, bison, readline, libexif
, x11Support ? true, 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=";
};
postPatch = ''
substituteInPlace doc/vim2html.pl \
--replace /usr/bin/perl ${perl}/bin/perl
'';
nativeBuildInputs = [ autoconf automake pkg-config ];
buildInputs =
[ perl flex bison readline libexif ]
++ 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;
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 = with maintainers; [ primeos ];
};
}