1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, cmark
6, darwin
7, git
8, libssh2
9, lua5_4
10, hunspell
11, ninja
12, openssl
13, pkg-config
14, qtbase
15, qttools
16, wrapQtAppsHook
17}:
18
19stdenv.mkDerivation rec {
20 pname = "gittyup";
21 version = "1.3.0";
22
23 src = fetchFromGitHub {
24 owner = "Murmele";
25 repo = "Gittyup";
26 rev = "gittyup_v${version}";
27 hash = "sha256-/8Uipz2R/LuA3KUcFsROOmldIKnCVLfIpIQ9YLpPA+k=";
28 fetchSubmodules = true;
29 };
30
31 cmakeFlags = [
32 "-DBUILD_SHARED_LIBS=OFF"
33 "-DUSE_SYSTEM_CMARK=ON"
34 "-DUSE_SYSTEM_GIT=ON"
35 "-DUSE_SYSTEM_HUNSPELL=ON"
36 # upstream uses its own fork of libgit2 as of 1.2.2, however this may change in the future
37 # "-DUSE_SYSTEM_LIBGIT2=ON"
38 "-DUSE_SYSTEM_LIBSSH2=ON"
39 "-DUSE_SYSTEM_LUA=ON"
40 "-DUSE_SYSTEM_OPENSSL=ON"
41 "-DENABLE_UPDATE_OVER_GUI=OFF"
42 ];
43
44 nativeBuildInputs = [
45 cmake
46 ninja
47 pkg-config
48 wrapQtAppsHook
49 ];
50
51 buildInputs = [
52 cmark
53 git
54 hunspell
55 libssh2
56 lua5_4
57 openssl
58 qtbase
59 qttools
60 ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
61 CoreFoundation
62 Security
63 ]);
64
65 postInstall = ''
66 # Those are not program libs, just some Qt5 libs that the build system leaks for some reason
67 rm -rf $out/{include,lib}
68 '';
69
70 meta = with lib; {
71 description = "A graphical Git client designed to help you understand and manage your source code history";
72 homepage = "https://murmele.github.io/Gittyup";
73 license = with licenses; [ mit ];
74 maintainers = with maintainers; [ thiagokokada ];
75 platforms = platforms.unix;
76 broken = stdenv.isDarwin;
77 };
78}