nixpkgs/pkgs/applications/networking/browsers/lagrange/default.nix
Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00

85 lines
1.7 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
nix-update-script,
cmake,
pkg-config,
fribidi,
harfbuzz,
libogg,
libwebp,
libX11,
mpg123,
opusfile,
SDL2,
the-foundation,
zip,
enableTUI ? false,
ncurses,
sealcurses,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "lagrange";
version = "1.18.5";
src = fetchFromGitHub {
owner = "skyjake";
repo = "lagrange";
tag = "v${finalAttrs.version}";
hash = "sha256-NlnT8dGh05dDjSMxjaBnW7x/KjLgf2Ma0nbaiR7MpiY=";
};
nativeBuildInputs = [
cmake
pkg-config
zip
];
buildInputs =
[
the-foundation
fribidi
harfbuzz
libogg
libwebp
libX11
mpg123
opusfile
SDL2
]
++ lib.optionals enableTUI [
ncurses
sealcurses
];
cmakeFlags = [
(lib.cmakeBool "ENABLE_TUI" enableTUI)
(lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "${placeholder "out"}/share")
];
installPhase =
lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv Lagrange.app $out/Applications
''
+ lib.optionalString (stdenv.hostPlatform.isDarwin && enableTUI) ''
# https://github.com/skyjake/lagrange/issues/610
make install
install -d $out/share/lagrange
ln -s $out/Applications/Lagrange.app/Contents/Resources/resources.lgr $out/share/lagrange/resources.lgr
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Beautiful Gemini Client";
homepage = "https://gmi.skyjake.fi/lagrange/";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ sikmir ];
platforms = lib.platforms.unix;
};
})