nsxiv: improve
- finalAttrs - multiple outputs - no nested with
This commit is contained in:
parent
7d44850eed
commit
26e1af1aa7
1 changed files with 12 additions and 10 deletions
|
@ -10,7 +10,7 @@
|
||||||
, conf ? null
|
, conf ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "nsxiv";
|
pname = "nsxiv";
|
||||||
version = "31";
|
version = "31";
|
||||||
|
|
||||||
|
@ -18,10 +18,12 @@ stdenv.mkDerivation rec {
|
||||||
domain = "codeberg.org";
|
domain = "codeberg.org";
|
||||||
owner = "nsxiv";
|
owner = "nsxiv";
|
||||||
repo = "nsxiv";
|
repo = "nsxiv";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-X1ZMr5OADs9GIe/kp/kEqKMMHZMymd58m9+f0SPzn7s=";
|
hash = "sha256-X1ZMr5OADs9GIe/kp/kEqKMMHZMymd58m9+f0SPzn7s=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "man" "doc" ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
giflib
|
giflib
|
||||||
imlib2
|
imlib2
|
||||||
|
@ -30,11 +32,11 @@ stdenv.mkDerivation rec {
|
||||||
libwebp
|
libwebp
|
||||||
] ++ lib.optional stdenv.isDarwin libinotify-kqueue;
|
] ++ lib.optional stdenv.isDarwin libinotify-kqueue;
|
||||||
|
|
||||||
preBuild = lib.optionalString (conf!=null) ''
|
postPatch = lib.optionalString (conf != null) ''
|
||||||
cp ${(builtins.toFile "config.def.h" conf)} config.def.h
|
cp ${(builtins.toFile "config.def.h" conf)} config.def.h
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify";
|
env.NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-linotify";
|
||||||
|
|
||||||
makeFlags = [ "CC:=$(CC)" ];
|
makeFlags = [ "CC:=$(CC)" ];
|
||||||
|
|
||||||
|
@ -42,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
installTargets = [ "install-all" ];
|
installTargets = [ "install-all" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
homepage = "https://nsxiv.codeberg.page/";
|
homepage = "https://nsxiv.codeberg.page/";
|
||||||
description = "New Suckless X Image Viewer";
|
description = "New Suckless X Image Viewer";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -59,9 +61,9 @@ stdenv.mkDerivation rec {
|
||||||
- Display image information in status bar
|
- Display image information in status bar
|
||||||
- Display image name/path in X title
|
- Display image name/path in X title
|
||||||
'';
|
'';
|
||||||
license = licenses.gpl2Plus;
|
changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${finalAttrs.src.rev}/etc/CHANGELOG.md";
|
||||||
maintainers = with maintainers; [ AndersonTorres sikmir ];
|
license = lib.licenses.gpl2Plus;
|
||||||
platforms = platforms.unix;
|
maintainers = with lib.maintainers; [ AndersonTorres sikmir ];
|
||||||
changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${src.rev}/etc/CHANGELOG.md";
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue