diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
commit | 50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch) | |
tree | f2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/by-name/ns/nsxiv/package.nix | |
parent | 4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff) | |
parent | cfc75eec4603c06503ae750f88cf397e00796ea8 (diff) | |
download | nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2 nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip |
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/ns/nsxiv/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/ns/nsxiv/package.nix | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/ns/nsxiv/package.nix b/nixpkgs/pkgs/by-name/ns/nsxiv/package.nix new file mode 100644 index 000000000000..4e3229b77d2e --- /dev/null +++ b/nixpkgs/pkgs/by-name/ns/nsxiv/package.nix @@ -0,0 +1,69 @@ +{ lib +, stdenv +, fetchFromGitea +, giflib +, imlib2 +, libXft +, libexif +, libwebp +, libinotify-kqueue +, conf ? null +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "nsxiv"; + version = "32"; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "nsxiv"; + repo = "nsxiv"; + rev = "v${finalAttrs.version}"; + hash = "sha256-UWaet7hVtgfuWTiNY4VcsMWTfS6L9r5w1fb/0dWz8SI="; + }; + + outputs = [ "out" "man" "doc" ]; + + buildInputs = [ + giflib + imlib2 + libXft + libexif + libwebp + ] ++ lib.optional stdenv.isDarwin libinotify-kqueue; + + postPatch = lib.optionalString (conf != null) '' + cp ${(builtins.toFile "config.def.h" conf)} config.def.h + ''; + + env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify"; + + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; + + installTargets = [ "install-all" ]; + + meta = { + homepage = "https://nsxiv.codeberg.page/"; + 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; + }; +}) |