Merge pull request #253767 from Anomalocaridid/nnn

nnn: add plugins, quitcd, and pcre and extra make flags build options

authored by

Fabián Heredia Montiel and committed by
GitHub
deb0f580 1a780236

+12 -2
+12 -2
pkgs/applications/file-managers/nnn/default.nix
··· 10 , readline 11 , which 12 , musl-fts 13 # options 14 , conf ? null 15 , withIcons ? false 16 , withNerdIcons ? false 17 , withEmojis ? false 18 }: 19 20 # Mutually exclusive options ··· 44 preBuild = lib.optionalString (conf != null) "cp ${finalAttrs.configFile} src/nnn.h"; 45 46 nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; 47 - buildInputs = [ readline ncurses ] ++ lib.optional stdenv.hostPlatform.isMusl musl-fts; 48 49 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-I${musl-fts}/include"; 50 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts"; ··· 52 makeFlags = [ "PREFIX=$(out)" ] 53 ++ lib.optionals withIcons [ "O_ICONS=1" ] 54 ++ lib.optionals withNerdIcons [ "O_NERD=1" ] 55 - ++ lib.optionals withEmojis [ "O_EMOJI=1" ]; 56 57 binPath = lib.makeBinPath [ file which ]; 58 ··· 62 installShellCompletion --bash --name nnn.bash misc/auto-completion/bash/nnn-completion.bash 63 installShellCompletion --fish misc/auto-completion/fish/nnn.fish 64 installShellCompletion --zsh misc/auto-completion/zsh/_nnn 65 66 wrapProgram $out/bin/nnn --prefix PATH : "$binPath" 67 '';
··· 10 , readline 11 , which 12 , musl-fts 13 + , pcre 14 # options 15 , conf ? null 16 , withIcons ? false 17 , withNerdIcons ? false 18 , withEmojis ? false 19 + , withPcre ? false 20 + , extraMakeFlags ? [ ] 21 }: 22 23 # Mutually exclusive options ··· 47 preBuild = lib.optionalString (conf != null) "cp ${finalAttrs.configFile} src/nnn.h"; 48 49 nativeBuildInputs = [ installShellFiles makeWrapper pkg-config ]; 50 + buildInputs = [ readline ncurses ] 51 + ++ lib.optional stdenv.hostPlatform.isMusl musl-fts 52 + ++ lib.optional withPcre pcre; 53 54 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-I${musl-fts}/include"; 55 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts"; ··· 57 makeFlags = [ "PREFIX=$(out)" ] 58 ++ lib.optionals withIcons [ "O_ICONS=1" ] 59 ++ lib.optionals withNerdIcons [ "O_NERD=1" ] 60 + ++ lib.optionals withEmojis [ "O_EMOJI=1" ] 61 + ++ lib.optionals withPcre [ "O_PCRE=1" ] 62 + ++ extraMakeFlags; 63 64 binPath = lib.makeBinPath [ file which ]; 65 ··· 69 installShellCompletion --bash --name nnn.bash misc/auto-completion/bash/nnn-completion.bash 70 installShellCompletion --fish misc/auto-completion/fish/nnn.fish 71 installShellCompletion --zsh misc/auto-completion/zsh/_nnn 72 + 73 + cp -r plugins $out/share 74 + cp -r misc/quitcd $out/share/quitcd 75 76 wrapProgram $out/bin/nnn --prefix PATH : "$binPath" 77 '';