nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 28e1d1dd31c4e41bc75c4dfa07ca16e6ba051ba6
parent b45170d5352b6a68240be3f84396b4596312a103
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Thu,  2 Dec 2021 04:06:17 +0300

Add nsxiv

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/suckless/nsxiv/default.nix | 33+++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -370,6 +370,7 @@ lib.makeScope newScope ( lacc = callPackage ./suckless/lacc { }; lel = callPackage ./suckless/lel { }; libst = callPackage ./suckless/libst { }; + nsxiv = callPackage ./suckless/nsxiv { }; pista = callPackage ./suckless/pista { }; saait = callPackage ./suckless/saait { }; sbase = callPackage ./suckless/sbase { }; diff --git a/pkgs/suckless/nsxiv/default.nix b/pkgs/suckless/nsxiv/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, libXft, imlib2, giflib, libexif, libwebp, conf ? null }: + +stdenv.mkDerivation rec { + pname = "nsxiv"; + version = "2021-12-01"; + + src = fetchFromGitHub { + owner = "nsxiv"; + repo = pname; + rev = "79b8fefcc45d6279c28505ab3d07f539fb9726ff"; + hash = "sha256-ZimwfNiopkka3htHkQRcSuVeU/YM36HcU8nokGHc7nM="; + }; + + configFile = lib.optionalString (conf!=null) (builtins.toFile "config.def.h" conf); + preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.def.h"; + + buildInputs = [ libXft imlib2 giflib libexif libwebp ]; + + installFlags = [ "PREFIX=$(out)" ]; + + postInstall = '' + install -Dm644 nsxiv.desktop -t $out/share/applications + ''; + + meta = with lib; { + description = "Neo Simple X Image Viewer"; + inherit (src.meta) homepage; + license = licenses.gpl2Plus; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.linux; + skip.ci = stdenv.isDarwin; + }; +}