3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/browsers/lagrange/default.nix

69 lines
1.4 KiB
Nix
Raw Normal View History

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 22:38:27 +01:00
, fribidi
, harfbuzz
2021-01-13 18:31:08 +00:00
, libunistring
2021-09-28 14:16:32 +01:00
, libwebp
2021-02-04 07:23:03 +00:00
, mpg123
2021-01-13 18:31:08 +00:00
, openssl
, pcre
, SDL2
, AppKit
2021-05-07 15:13:44 +01:00
, zlib
2021-01-13 18:31:08 +00:00
}:
stdenv.mkDerivation rec {
pname = "lagrange";
2021-09-28 14:16:32 +01:00
version = "1.7.1";
2021-01-13 18:31:08 +00:00
src = fetchFromGitHub {
owner = "skyjake";
repo = "lagrange";
rev = "v${version}";
2021-09-28 14:16:32 +01:00
sha256 = "sha256-I3U2Jh+PSF+j8Kuv5RejYwiMC1JYBpkYQGsgIFi7LL0=";
2021-01-13 18:31:08 +00:00
fetchSubmodules = true;
};
2021-07-29 22:38:27 +01:00
postPatch = ''
rm -r lib/fribidi lib/harfbuzz
'';
2021-01-13 18:31:08 +00:00
nativeBuildInputs = [ cmake pkg-config ];
2021-09-28 14:16:32 +01:00
buildInputs = [ fribidi harfbuzz libunistring libwebp mpg123 openssl pcre SDL2 zlib ]
2021-01-13 18:31:08 +00:00
++ lib.optional stdenv.isDarwin AppKit;
hardeningDisable = lib.optional (!stdenv.cc.isClang) "format";
2021-07-29 22:38:27 +01:00
cmakeFlags = [
"-DENABLE_HARFBUZZ_MINIMAL:BOOL=OFF"
"-DENABLE_FRIBIDI_BUILD:BOOL=OFF"
];
installPhase = lib.optionalString stdenv.isDarwin ''
2021-01-13 18:31:08 +00:00
mkdir -p $out/Applications
mv Lagrange.app $out/Applications
2021-07-29 22:38:27 +01: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;
2021-09-28 14:16:32 +01:00
# macOS SDK 10.13 or later required
# See https://github.com/NixOS/nixpkgs/issues/101229
broken = stdenv.isDarwin && stdenv.isx86_64;
2021-01-13 18:31:08 +00:00
};
}