nixpkgs/pkgs/by-name/ns/nsxiv/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.8 KiB
Nix
Raw Normal View History

2022-02-25 15:46:45 +00:00
{ lib
, stdenv
2022-08-07 06:35:13 +01:00
, fetchFromGitea
2022-02-25 15:46:45 +00:00
, giflib
, imlib2
, libXft
, libexif
, libwebp
2022-08-07 06:35:13 +01:00
, libinotify-kqueue
2022-02-25 15:46:45 +00:00
, conf ? null
}:
stdenv.mkDerivation (finalAttrs: {
2022-02-25 15:46:45 +00:00
pname = "nsxiv";
version = "32";
2022-02-25 15:46:45 +00:00
2022-08-07 06:35:13 +01:00
src = fetchFromGitea {
domain = "codeberg.org";
2022-02-25 15:46:45 +00:00
owner = "nsxiv";
2022-08-07 06:35:13 +01:00
repo = "nsxiv";
rev = "v${finalAttrs.version}";
hash = "sha256-UWaet7hVtgfuWTiNY4VcsMWTfS6L9r5w1fb/0dWz8SI=";
2022-02-25 15:46:45 +00:00
};
outputs = [ "out" "man" "doc" ];
2022-02-25 15:46:45 +00:00
buildInputs = [
giflib
imlib2
libXft
libexif
libwebp
2022-08-07 06:35:13 +01:00
] ++ lib.optional stdenv.isDarwin libinotify-kqueue;
2022-02-25 15:46:45 +00:00
postPatch = lib.optionalString (conf != null) ''
2022-02-25 15:46:45 +00:00
cp ${(builtins.toFile "config.def.h" conf)} config.def.h
'';
env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify";
2022-08-07 06:35:13 +01:00
makeFlags = [ "CC:=$(CC)" ];
installFlags = [ "PREFIX=$(out)" ];
installTargets = [ "install-all" ];
2022-02-25 15:46:45 +00:00
meta = {
2022-08-07 06:35:13 +01:00
homepage = "https://nsxiv.codeberg.page/";
2022-02-25 15:46:45 +00:00
description = "New Suckless X Image Viewer";
longDescription = ''
nsxiv is a fork of now unmaintained sxiv with the purpose of being a
drop-in replacement of sxiv, maintaining it and adding simple, sensible
features, like:
- Basic image operations, e.g. zooming, panning, rotating
- Customizable key and mouse button mappings (in config.h)
- Script-ability via key-handler
- Thumbnail mode: grid of selectable previews of all images
- Ability to cache thumbnails for fast re-loading
- Basic support for animated/multi-frame images (GIF/WebP)
- Display image information in status bar
- Display image name/path in X title
'';
changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${finalAttrs.src.rev}/etc/CHANGELOG.md";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ AndersonTorres sikmir ];
platforms = lib.platforms.unix;
2022-02-25 15:46:45 +00:00
};
})