bemenu: add darwin platform (#397591)

authored by Thiago Kenji Okada and committed by GitHub 6cddb753 60d1922d

+23 -7
+23 -7
pkgs/by-name/be/bemenu/package.nix
··· 9 harfbuzz, 10 pkg-config, 11 scdoc, 12 ncursesSupport ? true, 13 ncurses, 14 - waylandSupport ? true, 15 wayland, 16 wayland-protocols, 17 wayland-scanner, 18 - x11Support ? true, 19 xorg, 20 }: 21 ··· 30 hash = "sha256-0vpqJ2jydTt6aVni0ma0g+80PFz+C4xJ5M77sMODkSg="; 31 }; 32 33 strictDeps = true; 34 - nativeBuildInputs = [ 35 - pkg-config 36 - scdoc 37 - ] ++ lib.optionals waylandSupport [ wayland-scanner ]; 38 39 buildInputs = 40 [ ··· 66 ++ lib.optional waylandSupport "wayland" 67 ++ lib.optional x11Support "x11"; 68 69 meta = with lib; { 70 homepage = "https://github.com/Cloudef/bemenu"; 71 description = "Dynamic menu library and client program inspired by dmenu"; 72 license = licenses.gpl3Plus; 73 maintainers = with maintainers; [ crertel ]; 74 mainProgram = "bemenu"; 75 - platforms = with platforms; linux; 76 }; 77 })
··· 9 harfbuzz, 10 pkg-config, 11 scdoc, 12 + makeWrapper, 13 ncursesSupport ? true, 14 ncurses, 15 + waylandSupport ? stdenv.hostPlatform.isLinux, 16 wayland, 17 wayland-protocols, 18 wayland-scanner, 19 + x11Support ? stdenv.hostPlatform.isLinux, 20 xorg, 21 }: 22 ··· 31 hash = "sha256-0vpqJ2jydTt6aVni0ma0g+80PFz+C4xJ5M77sMODkSg="; 32 }; 33 34 + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 35 + substituteInPlace GNUmakefile --replace '-soname' '-install_name' 36 + ''; 37 + 38 strictDeps = true; 39 + nativeBuildInputs = 40 + [ 41 + pkg-config 42 + scdoc 43 + ] 44 + ++ lib.optional stdenv.hostPlatform.isDarwin makeWrapper 45 + ++ lib.optional waylandSupport wayland-scanner; 46 47 buildInputs = 48 [ ··· 74 ++ lib.optional waylandSupport "wayland" 75 ++ lib.optional x11Support "x11"; 76 77 + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 78 + so="$(find "$out/lib" -name "libbemenu.so.[0-9]" -print -quit)" 79 + for f in "$out/bin/"*; do 80 + install_name_tool -change "$(basename $so)" "$so" $f 81 + wrapProgram $f --set BEMENU_BACKEND curses 82 + done 83 + ''; 84 + 85 meta = with lib; { 86 homepage = "https://github.com/Cloudef/bemenu"; 87 description = "Dynamic menu library and client program inspired by dmenu"; 88 license = licenses.gpl3Plus; 89 maintainers = with maintainers; [ crertel ]; 90 mainProgram = "bemenu"; 91 + platforms = with platforms; linux ++ darwin; 92 }; 93 })