summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/networking/browsers/lagrange/default.nix
blob: 10831c57f8d8e1201df7a52158c0db01971ba420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, libunistring
, openssl
, pcre
, SDL2
, AppKit
}:

stdenv.mkDerivation rec {
  pname = "lagrange";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "skyjake";
    repo = "lagrange";
    rev = "v${version}";
    sha256 = "04bp5k1byjbzwnmcx4b7sw68pr2jrj4c21z76jq311hyrmanj6fi";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ cmake pkg-config ];

  buildInputs = [ libunistring openssl pcre SDL2 ]
    ++ 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;

  meta = with lib; {
    description = "A Beautiful Gemini Client";
    homepage = "https://gmi.skyjake.fi/lagrange/";
    license = licenses.bsd2;
    maintainers = with maintainers; [ sikmir ];
    platforms = platforms.unix;
  };
}