mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 13:03:34 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
76 lines
1.9 KiB
Nix
76 lines
1.9 KiB
Nix
{
|
|
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.hostPlatform.isDarwin libinotify-kqueue;
|
|
|
|
postPatch = lib.optionalString (conf != null) ''
|
|
cp ${(builtins.toFile "config.def.h" conf)} config.def.h
|
|
'';
|
|
|
|
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-linotify";
|
|
|
|
makeFlags = [ "CC:=$(CC)" ];
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
installTargets = [ "install-all" ];
|
|
|
|
meta = {
|
|
homepage = "https://nsxiv.codeberg.page/";
|
|
description = "New Suckless X Image Viewer";
|
|
mainProgram = "nsxiv";
|
|
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; [ sikmir ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|