nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 python3,
5 keybinder3,
6 intltool,
7 file,
8 gtk3,
9 gobject-introspection,
10 libnotify,
11 makeBinaryWrapper,
12 wrapGAppsHook3,
13 vte,
14 nixosTests,
15}:
16
17python3.pkgs.buildPythonApplication rec {
18 pname = "terminator";
19 version = "2.1.5";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "gnome-terminator";
24 repo = "terminator";
25 tag = "v${version}";
26 hash = "sha256-RM/7jUWGDV0EdMyMeLsCrvevH+5hZSJVAKmtalxNKG8=";
27 };
28
29 nativeBuildInputs = [
30 file
31 intltool
32 gobject-introspection
33 makeBinaryWrapper
34 wrapGAppsHook3
35 ];
36
37 buildInputs = [
38 gtk3
39 keybinder3
40 libnotify
41 python3
42 vte
43 ];
44
45 build-system = with python3.pkgs; [ setuptools ];
46
47 dependencies = with python3.pkgs; [
48 configobj
49 dbus-python
50 pygobject3
51 psutil
52 pycairo
53 ];
54
55 postPatch = ''
56 patchShebangs tests po
57 '';
58
59 doCheck = false;
60
61 pythonImportsCheck = [ "terminatorlib" ];
62
63 dontWrapGApps = true;
64
65 # HACK: 'wrapPythonPrograms' will add things to the $PATH in the wrapper. This bleeds into the
66 # terminal session produced by terminator. To avoid this, we force wrapPythonPrograms to only
67 # use gappsWrapperArgs by redefining wrapProgram to ignore its arguments and only apply the
68 # wrapper arguments we want it to use.
69 # TODO: Adjust wrapPythonPrograms to respect an argument that tells it to leave $PATH alone.
70 preFixup = ''
71 wrapProgram() {
72 wrapProgramBinary "$1" "''${gappsWrapperArgs[@]}"
73 }
74 '';
75
76 passthru.tests.test = nixosTests.terminal-emulators.terminator;
77
78 meta = {
79 description = "Terminal emulator with support for tiling and tabs";
80 longDescription = ''
81 The goal of this project is to produce a useful tool for arranging
82 terminals. It is inspired by programs such as gnome-multi-term,
83 quadkonsole, etc. in that the main focus is arranging terminals in grids
84 (tabs is the most common default method, which Terminator also supports).
85 '';
86 changelog = "https://github.com/gnome-terminator/terminator/releases/tag/${src.tag}";
87 homepage = "https://github.com/gnome-terminator/terminator";
88 license = lib.licenses.gpl2;
89 maintainers = with lib.maintainers; [ bjornfor ];
90 platforms = lib.platforms.linux;
91 };
92}