lol

nsxiv: improve

- finalAttrs
- multiple outputs
- no nested with

+12 -10
+12 -10
pkgs/by-name/ns/nsxiv/package.nix
··· 10 , conf ? null 11 }: 12 13 - stdenv.mkDerivation rec { 14 pname = "nsxiv"; 15 version = "31"; 16 ··· 18 domain = "codeberg.org"; 19 owner = "nsxiv"; 20 repo = "nsxiv"; 21 - rev = "v${version}"; 22 hash = "sha256-X1ZMr5OADs9GIe/kp/kEqKMMHZMymd58m9+f0SPzn7s="; 23 }; 24 25 buildInputs = [ 26 giflib ··· 30 libwebp 31 ] ++ lib.optional stdenv.isDarwin libinotify-kqueue; 32 33 - preBuild = lib.optionalString (conf!=null) '' 34 cp ${(builtins.toFile "config.def.h" conf)} config.def.h 35 ''; 36 37 - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify"; 38 39 makeFlags = [ "CC:=$(CC)" ]; 40 ··· 42 43 installTargets = [ "install-all" ]; 44 45 - meta = with lib; { 46 homepage = "https://nsxiv.codeberg.page/"; 47 description = "New Suckless X Image Viewer"; 48 longDescription = '' ··· 59 - Display image information in status bar 60 - Display image name/path in X title 61 ''; 62 - license = licenses.gpl2Plus; 63 - maintainers = with maintainers; [ AndersonTorres sikmir ]; 64 - platforms = platforms.unix; 65 - changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${src.rev}/etc/CHANGELOG.md"; 66 }; 67 - }
··· 10 , conf ? null 11 }: 12 13 + stdenv.mkDerivation (finalAttrs: { 14 pname = "nsxiv"; 15 version = "31"; 16 ··· 18 domain = "codeberg.org"; 19 owner = "nsxiv"; 20 repo = "nsxiv"; 21 + rev = "v${finalAttrs.version}"; 22 hash = "sha256-X1ZMr5OADs9GIe/kp/kEqKMMHZMymd58m9+f0SPzn7s="; 23 }; 24 + 25 + outputs = [ "out" "man" "doc" ]; 26 27 buildInputs = [ 28 giflib ··· 32 libwebp 33 ] ++ lib.optional stdenv.isDarwin libinotify-kqueue; 34 35 + postPatch = lib.optionalString (conf != null) '' 36 cp ${(builtins.toFile "config.def.h" conf)} config.def.h 37 ''; 38 39 + env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify"; 40 41 makeFlags = [ "CC:=$(CC)" ]; 42 ··· 44 45 installTargets = [ "install-all" ]; 46 47 + meta = { 48 homepage = "https://nsxiv.codeberg.page/"; 49 description = "New Suckless X Image Viewer"; 50 longDescription = '' ··· 61 - Display image information in status bar 62 - Display image name/path in X title 63 ''; 64 + changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${finalAttrs.src.rev}/etc/CHANGELOG.md"; 65 + license = lib.licenses.gpl2Plus; 66 + maintainers = with lib.maintainers; [ AndersonTorres sikmir ]; 67 + platforms = lib.platforms.unix; 68 }; 69 + })