nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 84 lines 1.7 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 nix-update-script, 6 cmake, 7 pkg-config, 8 fribidi, 9 harfbuzz, 10 libogg, 11 libwebp, 12 libX11, 13 mpg123, 14 opusfile, 15 SDL2, 16 the-foundation, 17 zip, 18 enableTUI ? false, 19 ncurses, 20 sealcurses, 21}: 22 23stdenv.mkDerivation (finalAttrs: { 24 pname = "lagrange"; 25 version = "1.19.4"; 26 27 src = fetchFromGitHub { 28 owner = "skyjake"; 29 repo = "lagrange"; 30 tag = "v${finalAttrs.version}"; 31 hash = "sha256-o8BDreuQbPrGuSV7k4OVy4XmMSSEXrdNzEzUXM6hMyA="; 32 }; 33 34 nativeBuildInputs = [ 35 cmake 36 pkg-config 37 zip 38 ]; 39 40 buildInputs = [ 41 the-foundation 42 fribidi 43 harfbuzz 44 libogg 45 libwebp 46 libX11 47 mpg123 48 opusfile 49 SDL2 50 ] 51 ++ lib.optionals enableTUI [ 52 ncurses 53 sealcurses 54 ]; 55 56 cmakeFlags = [ 57 (lib.cmakeBool "ENABLE_TUI" enableTUI) 58 (lib.cmakeFeature "CMAKE_INSTALL_DATAROOTDIR" "${placeholder "out"}/share") 59 ]; 60 61 installPhase = 62 lib.optionalString stdenv.hostPlatform.isDarwin '' 63 mkdir -p $out/Applications 64 mv Lagrange.app $out/Applications 65 '' 66 + lib.optionalString (stdenv.hostPlatform.isDarwin && enableTUI) '' 67 # https://github.com/skyjake/lagrange/issues/610 68 make install 69 install -d $out/share/lagrange 70 ln -s $out/Applications/Lagrange.app/Contents/Resources/resources.lgr $out/share/lagrange/resources.lgr 71 ''; 72 73 passthru = { 74 updateScript = nix-update-script { }; 75 }; 76 77 meta = { 78 description = "Beautiful Gemini Client"; 79 homepage = "https://gmi.skyjake.fi/lagrange/"; 80 license = lib.licenses.bsd2; 81 maintainers = with lib.maintainers; [ sikmir ]; 82 platforms = lib.platforms.unix; 83 }; 84})