1{
2 stdenv,
3 lib,
4 fetchFromGitLab,
5 qtserialport,
6 cmake,
7 wrapQtAppsHook,
8}:
9
10stdenv.mkDerivation {
11 pname = "cutecom";
12 version = "0.51.0+patch";
13
14 src = fetchFromGitLab {
15 owner = "cutecom";
16 repo = "cutecom";
17 rev = "70d0c497acf8f298374052b2956bcf142ed5f6ca";
18 sha256 = "X8jeESt+x5PxK3rTNC1h1Tpvue2WH09QRnG2g1eMoEE=";
19 };
20
21 postPatch = ''
22 substituteInPlace CMakeLists.txt \
23 --replace "/Applications" "$out/Applications"
24 '';
25
26 buildInputs = [ qtserialport ];
27 nativeBuildInputs = [
28 cmake
29 wrapQtAppsHook
30 ];
31
32 postInstall =
33 if stdenv.hostPlatform.isDarwin then
34 ''
35 mkdir -p $out/Applications
36 ''
37 else
38 ''
39 cd ..
40 mkdir -p "$out"/share/{applications,icons/hicolor/scalable/apps,man/man1}
41 cp cutecom.desktop "$out/share/applications"
42 cp images/cutecom.svg "$out/share/icons/hicolor/scalable/apps"
43 cp cutecom.1 "$out/share/man/man1"
44 '';
45
46 meta = with lib; {
47 description = "Graphical serial terminal";
48 homepage = "https://gitlab.com/cutecom/cutecom/";
49 license = licenses.gpl3Plus;
50 maintainers = with maintainers; [ bennofs ];
51 platforms = platforms.unix;
52 mainProgram = "cutecom";
53 };
54}