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