1{
2 stdenv,
3 lib,
4 fetchgit,
5 qt5,
6 qtbase,
7 qtx11extras,
8 qttools,
9 zlib,
10 gnumake,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "x2gokdriveclient";
15 version = "0.0.0.1-unstable-2024-09-10";
16
17 src = fetchgit {
18 #url = "https://code.x2go.org/git/x2gokdriveclient.git";
19
20 # in reference to https://github.com/NixOS/nixpkgs/tree/master/pkgs#sources
21 # I am aware that this is bad practice. The HTTPS url above responds with a 500 and is hopelessly
22 # overloaded. the X2Go project doesn't seem to maintain a good and healthy code repository on github
23 # either.
24 url = "git://code.x2go.org/x2gokdriveclient.git";
25 rev = "ed53784a236ef4fe00adce726be492c4bf227d73";
26 hash = "sha256-hWPM0bye4I34T7y2ipZOULY2+ehVanmTj4V80+lc+iw=";
27 };
28
29 buildInputs = [
30 qtbase
31 qtx11extras
32 qttools
33 zlib
34 ];
35
36 nativeBuildInputs = [
37 qt5.wrapQtAppsHook
38 ];
39
40 postPatch = ''
41 substituteInPlace Makefile \
42 --replace-fail "SHELL=/bin/bash" "SHELL=$SHELL" \
43 --replace-fail "MAKEOVERRIDES" "NOMAKEOVERRIDES " \
44 --replace-fail ".MAKEFLAGS" ".NOFLAGS " \
45 --replace-fail "qmake" "${qtbase.dev}/bin/qmake" \
46 --replace-fail "-o root -g root" ""
47 substituteInPlace \
48 VERSION.x2gokdriveclient \
49 x2gokdriveclient.spec \
50 man/man1/x2gokdriveclient.1 \
51 --replace-fail "0.0.0.2" "${finalAttrs.version}"
52 '';
53
54 makeFlags = [
55 "PREFIX=$(out)"
56 "ETCDIR=$(out)/etc"
57 "build_client"
58 "build_man"
59 ];
60
61 installTargets = [
62 "install_client"
63 "install_man"
64 ];
65
66 qtWrapperArgs = [
67 "--set QT_QPA_PLATFORM xcb"
68 ];
69
70 meta = with lib; {
71 description = "Graphical NoMachine NX3 remote desktop client (KDrive client)";
72 mainProgram = "x2gokdriveclient";
73 homepage = "https://x2go.org/";
74 maintainers = with maintainers; [ juliabru ];
75 license = licenses.gpl3;
76 platforms = platforms.linux;
77 };
78})