2021-01-13 18:31:08 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2021-02-04 07:23:03 +00:00
|
|
|
, nix-update-script
|
2021-01-13 18:31:08 +00:00
|
|
|
, cmake
|
|
|
|
, pkg-config
|
2021-07-29 21:38:27 +00:00
|
|
|
, fribidi
|
|
|
|
, harfbuzz
|
2021-09-28 13:16:32 +00:00
|
|
|
, libwebp
|
2021-02-04 07:23:03 +00:00
|
|
|
, mpg123
|
2021-01-13 18:31:08 +00:00
|
|
|
, SDL2
|
2022-05-04 09:57:13 +00:00
|
|
|
, the-foundation
|
2021-01-13 18:31:08 +00:00
|
|
|
, AppKit
|
2021-11-03 11:40:00 +00:00
|
|
|
, zip
|
2022-05-04 09:57:13 +00:00
|
|
|
, enableTUI ? false, ncurses, sealcurses
|
2021-01-13 18:31:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lagrange";
|
2022-11-04 09:25:00 +00:00
|
|
|
version = "1.13.8";
|
2021-01-13 18:31:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "skyjake";
|
|
|
|
repo = "lagrange";
|
|
|
|
rev = "v${version}";
|
2022-11-04 09:25:00 +00:00
|
|
|
sha256 = "sha256-SdncFkMCAY28njw361R70h6gcK0YHSU7AUwf9wzxCRo=";
|
2021-01-13 18:31:08 +00:00
|
|
|
};
|
|
|
|
|
2021-11-03 11:40:00 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config zip ];
|
2021-01-13 18:31:08 +00:00
|
|
|
|
2022-05-04 09:57:13 +00:00
|
|
|
buildInputs = [ the-foundation ]
|
|
|
|
++ lib.optionals (!enableTUI) [ fribidi harfbuzz libwebp mpg123 SDL2 ]
|
|
|
|
++ lib.optionals enableTUI [ ncurses sealcurses ]
|
2021-01-13 18:31:08 +00:00
|
|
|
++ lib.optional stdenv.isDarwin AppKit;
|
|
|
|
|
2022-05-04 09:57:13 +00:00
|
|
|
cmakeFlags = lib.optionals enableTUI [
|
|
|
|
"-DENABLE_TUI=YES"
|
|
|
|
"-DENABLE_MPG123=NO"
|
|
|
|
"-DENABLE_WEBP=NO"
|
|
|
|
"-DENABLE_FRIBIDI=NO"
|
|
|
|
"-DENABLE_HARFBUZZ=NO"
|
|
|
|
"-DENABLE_POPUP_MENUS=NO"
|
|
|
|
"-DENABLE_IDLE_SLEEP=NO"
|
|
|
|
"-DCMAKE_INSTALL_DATADIR=${placeholder "out"}/share"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = lib.optionalString (stdenv.isDarwin && !enableTUI) ''
|
2021-01-13 18:31:08 +00:00
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv Lagrange.app $out/Applications
|
2021-07-29 21:38:27 +00:00
|
|
|
'';
|
2021-01-13 18:31:08 +00:00
|
|
|
|
2021-02-04 07:23:03 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-13 18:31:08 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Beautiful Gemini Client";
|
|
|
|
homepage = "https://gmi.skyjake.fi/lagrange/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|