nnn: 4.6 → 4.7

This commit is contained in:
Nikolay Korotkiy 2022-11-24 19:48:37 +03:00
parent cd77d358f9
commit 87b1646899
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5

View file

@ -19,19 +19,19 @@
assert withIcons -> withNerdIcons == false; assert withIcons -> withNerdIcons == false;
assert withNerdIcons -> withIcons == false; assert withNerdIcons -> withIcons == false;
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "nnn"; pname = "nnn";
version = "4.6"; version = "4.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jarun"; owner = "jarun";
repo = pname; repo = "nnn";
rev = "v${version}"; rev = "v${finalAttrs.version}";
sha256 = "sha256-+EAKOXZp1kxA2X3e16ItjPT7Sa3WZuP2oxOdXkceTIY="; hash = "sha256-ttG0aEqMlNyJaMhcVfrxbxlrhr1GSydrV58CYSq4CTM=";
}; };
configFile = lib.optionalString (conf != null) (builtins.toFile "nnn.h" conf); configFile = lib.optionalString (conf != null) (builtins.toFile "nnn.h" conf);
preBuild = lib.optionalString (conf != null) "cp ${configFile} src/nnn.h"; preBuild = lib.optionalString (conf != null) "cp ${finalAttrs.configFile} src/nnn.h";
nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ];
buildInputs = [ readline ncurses ] ++ lib.optional stdenv.hostPlatform.isMusl musl-fts; buildInputs = [ readline ncurses ] ++ lib.optional stdenv.hostPlatform.isMusl musl-fts;
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-I${musl-fts}/include"; NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-I${musl-fts}/include";
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts"; NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts";
makeFlags = [ "PREFIX=${placeholder "out"}" ] makeFlags = [ "PREFIX=$(out)" ]
++ lib.optionals withIcons [ "O_ICONS=1" ] ++ lib.optionals withIcons [ "O_ICONS=1" ]
++ lib.optionals withNerdIcons [ "O_NERD=1" ]; ++ lib.optionals withNerdIcons [ "O_NERD=1" ];
@ -61,4 +61,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ jfrankenau Br1ght0ne ]; maintainers = with maintainers; [ jfrankenau Br1ght0ne ];
}; };
} })