mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
bemenu: add darwin platform
This commit is contained in:
parent
fcec87c2f6
commit
fd39404632
1 changed files with 23 additions and 7 deletions
|
@ -9,13 +9,14 @@
|
|||
harfbuzz,
|
||||
pkg-config,
|
||||
scdoc,
|
||||
makeWrapper,
|
||||
ncursesSupport ? true,
|
||||
ncurses,
|
||||
waylandSupport ? true,
|
||||
waylandSupport ? stdenv.hostPlatform.isLinux,
|
||||
wayland,
|
||||
wayland-protocols,
|
||||
wayland-scanner,
|
||||
x11Support ? true,
|
||||
x11Support ? stdenv.hostPlatform.isLinux,
|
||||
xorg,
|
||||
}:
|
||||
|
||||
|
@ -30,11 +31,18 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
hash = "sha256-0vpqJ2jydTt6aVni0ma0g+80PFz+C4xJ5M77sMODkSg=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace GNUmakefile --replace '-soname' '-install_name'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
scdoc
|
||||
] ++ lib.optionals waylandSupport [ wayland-scanner ];
|
||||
nativeBuildInputs =
|
||||
[
|
||||
pkg-config
|
||||
scdoc
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin makeWrapper
|
||||
++ lib.optional waylandSupport wayland-scanner;
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
|
@ -66,12 +74,20 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
++ lib.optional waylandSupport "wayland"
|
||||
++ lib.optional x11Support "x11";
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
so="$(find "$out/lib" -name "libbemenu.so.[0-9]" -print -quit)"
|
||||
for f in "$out/bin/"*; do
|
||||
install_name_tool -change "$(basename $so)" "$so" $f
|
||||
wrapProgram $f --set BEMENU_BACKEND curses
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Cloudef/bemenu";
|
||||
description = "Dynamic menu library and client program inspired by dmenu";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ crertel ];
|
||||
mainProgram = "bemenu";
|
||||
platforms = with platforms; linux;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue