1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 mkDerivation,
6 qtbase,
7 qmltermwidget,
8 qtquickcontrols2,
9 qtgraphicaleffects,
10 qmake,
11 nixosTests,
12}:
13
14mkDerivation rec {
15 version = "1.2.0";
16 pname = "cool-retro-term";
17
18 src = fetchFromGitHub {
19 owner = "Swordfish90";
20 repo = "cool-retro-term";
21 tag = version;
22 hash = "sha256-PewHLVmo+RTBHIQ/y2FBkgXsIvujYd7u56JdFC10B4c=";
23 };
24
25 patchPhase = ''
26 sed -i -e '/qmltermwidget/d' cool-retro-term.pro
27 '';
28
29 buildInputs = [
30 qtbase
31 qmltermwidget
32 qtquickcontrols2
33 qtgraphicaleffects
34 ];
35
36 nativeBuildInputs = [ qmake ];
37
38 installFlags = [ "INSTALL_ROOT=$(out)" ];
39
40 preFixup = ''
41 mv $out/usr/share $out/share
42 mv $out/usr/bin $out/bin
43 rmdir $out/usr
44 ''
45 + lib.optionalString stdenv.hostPlatform.isDarwin ''
46 ln -s $out/bin/cool-retro-term.app/Contents/MacOS/cool-retro-term $out/bin/cool-retro-term
47 '';
48
49 passthru.tests.test = nixosTests.terminal-emulators.cool-retro-term;
50
51 meta = {
52 description = "Terminal emulator which mimics the old cathode display";
53 longDescription = ''
54 cool-retro-term is a terminal emulator which tries to mimic the look and
55 feel of the old cathode tube screens. It has been designed to be
56 eye-candy, customizable, and reasonably lightweight.
57 '';
58 homepage = "https://github.com/Swordfish90/cool-retro-term";
59 license = lib.licenses.gpl3Plus;
60 platforms = with lib.platforms; linux ++ darwin;
61 maintainers = [ ];
62 mainProgram = "cool-retro-term";
63 };
64}