mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +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,
|
harfbuzz,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
scdoc,
|
scdoc,
|
||||||
|
makeWrapper,
|
||||||
ncursesSupport ? true,
|
ncursesSupport ? true,
|
||||||
ncurses,
|
ncurses,
|
||||||
waylandSupport ? true,
|
waylandSupport ? stdenv.hostPlatform.isLinux,
|
||||||
wayland,
|
wayland,
|
||||||
wayland-protocols,
|
wayland-protocols,
|
||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
x11Support ? true,
|
x11Support ? stdenv.hostPlatform.isLinux,
|
||||||
xorg,
|
xorg,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -30,11 +31,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
hash = "sha256-0vpqJ2jydTt6aVni0ma0g+80PFz+C4xJ5M77sMODkSg=";
|
hash = "sha256-0vpqJ2jydTt6aVni0ma0g+80PFz+C4xJ5M77sMODkSg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
substituteInPlace GNUmakefile --replace '-soname' '-install_name'
|
||||||
|
'';
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs =
|
||||||
|
[
|
||||||
pkg-config
|
pkg-config
|
||||||
scdoc
|
scdoc
|
||||||
] ++ lib.optionals waylandSupport [ wayland-scanner ];
|
]
|
||||||
|
++ lib.optional stdenv.hostPlatform.isDarwin makeWrapper
|
||||||
|
++ lib.optional waylandSupport wayland-scanner;
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[
|
[
|
||||||
|
@ -66,12 +74,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
++ lib.optional waylandSupport "wayland"
|
++ lib.optional waylandSupport "wayland"
|
||||||
++ lib.optional x11Support "x11";
|
++ 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; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/Cloudef/bemenu";
|
homepage = "https://github.com/Cloudef/bemenu";
|
||||||
description = "Dynamic menu library and client program inspired by dmenu";
|
description = "Dynamic menu library and client program inspired by dmenu";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with maintainers; [ crertel ];
|
maintainers = with maintainers; [ crertel ];
|
||||||
mainProgram = "bemenu";
|
mainProgram = "bemenu";
|
||||||
platforms = with platforms; linux;
|
platforms = with platforms; linux ++ darwin;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue