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
|
|
|
|
, libunistring
|
2021-02-04 07:23:03 +00:00
|
|
|
, mpg123
|
2021-01-13 18:31:08 +00:00
|
|
|
, openssl
|
|
|
|
, pcre
|
|
|
|
, SDL2
|
|
|
|
, AppKit
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lagrange";
|
2021-02-04 07:23:03 +00:00
|
|
|
version = "1.1.1";
|
2021-01-13 18:31:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "skyjake";
|
|
|
|
repo = "lagrange";
|
|
|
|
rev = "v${version}";
|
2021-02-04 07:23:03 +00:00
|
|
|
sha256 = "0c7w4a19cwx3bkmbhc9c1wx0zmqd3a1grrj4ffifdic95wdihv7x";
|
2021-01-13 18:31:08 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
2021-02-04 07:23:03 +00:00
|
|
|
buildInputs = [ libunistring mpg123 openssl pcre SDL2 ]
|
2021-01-13 18:31:08 +00:00
|
|
|
++ lib.optional stdenv.isDarwin AppKit;
|
|
|
|
|
|
|
|
hardeningDisable = lib.optional (!stdenv.cc.isClang) "format";
|
|
|
|
|
|
|
|
installPhase = if stdenv.isDarwin then ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv Lagrange.app $out/Applications
|
|
|
|
'' else null;
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|