vifm: 0.13 -> 0.14 (#380559)
[NixPkgs.git] / pkgs / by-name / ns / nsxiv / package.nix
blobf19b9e12a9fc3ff556949c0e696aedbd76066645
2   lib,
3   stdenv,
4   fetchFromGitea,
5   giflib,
6   imlib2,
7   libXft,
8   libexif,
9   libwebp,
10   libinotify-kqueue,
11   conf ? null,
14 stdenv.mkDerivation (finalAttrs: {
15   pname = "nsxiv";
16   version = "33";
18   src = fetchFromGitea {
19     domain = "codeberg.org";
20     owner = "nsxiv";
21     repo = "nsxiv";
22     rev = "v${finalAttrs.version}";
23     hash = "sha256-H1s+pLpHTmoDssdudtAq6Ru0jwZZ55/qamEVgtHTGfk=";
24   };
26   outputs = [
27     "out"
28     "man"
29     "doc"
30   ];
32   buildInputs = [
33     giflib
34     imlib2
35     libXft
36     libexif
37     libwebp
38   ] ++ lib.optional stdenv.hostPlatform.isDarwin libinotify-kqueue;
40   postPatch = lib.optionalString (conf != null) ''
41     cp ${(builtins.toFile "config.def.h" conf)} config.def.h
42   '';
44   env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-linotify";
46   makeFlags = [ "CC:=$(CC)" ];
48   installFlags = [ "PREFIX=$(out)" ];
50   installTargets = [ "install-all" ];
52   meta = {
53     homepage = "https://nsxiv.codeberg.page/";
54     description = "New Suckless X Image Viewer";
55     mainProgram = "nsxiv";
56     longDescription = ''
57       nsxiv is a fork of now unmaintained sxiv with the purpose of being a
58       drop-in replacement of sxiv, maintaining it and adding simple, sensible
59       features, like:
61       - Basic image operations, e.g. zooming, panning, rotating
62       - Customizable key and mouse button mappings (in config.h)
63       - Script-ability via key-handler
64       - Thumbnail mode: grid of selectable previews of all images
65       - Ability to cache thumbnails for fast re-loading
66       - Basic support for animated/multi-frame images (GIF/WebP)
67       - Display image information in status bar
68       - Display image name/path in X title
69     '';
70     changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${finalAttrs.src.rev}/etc/CHANGELOG.md";
71     license = lib.licenses.gpl2Plus;
72     maintainers = with lib.maintainers; [ sikmir ];
73     platforms = lib.platforms.unix;
74   };