nixpkgs/pkgs/applications/terminal-emulators/terminator/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

77 lines
1.8 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, python3
, keybinder3
, intltool
, file
, gtk3
, gobject-introspection
, libnotify
, wrapGAppsHook
, vte
}:
python3.pkgs.buildPythonApplication rec {
pname = "terminator";
version = "1.92";
src = fetchFromGitHub {
owner = "gnome-terminator";
repo = "terminator";
rev = "v${version}";
sha256 = "105f660wzf9cpn24xzwaaa09igg5h3qhchafv190v5nqck6g1ssh";
};
nativeBuildInputs = [
file
intltool
gobject-introspection
wrapGAppsHook
];
buildInputs = [
gtk3
gobject-introspection # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
keybinder3
libnotify
python3
vte
];
propagatedBuildInputs = with python3.pkgs; [
configobj
dbus-python
pygobject3
psutil
pycairo
];
postPatch = ''
patchShebangs run_tests tests po
# dbus-python is correctly passed in propagatedBuildInputs, but for some reason setup.py complains.
# The wrapped terminator has the correct path added, so ignore this.
substituteInPlace setup.py --replace "'dbus-python'," ""
'';
checkPhase = ''
runHook preCheck
./run_tests
runHook postCheck
'';
meta = with lib; {
description = "Terminal emulator with support for tiling and tabs";
longDescription = ''
The goal of this project is to produce a useful tool for arranging
terminals. It is inspired by programs such as gnome-multi-term,
quadkonsole, etc. in that the main focus is arranging terminals in grids
(tabs is the most common default method, which Terminator also supports).
'';
homepage = "https://github.com/gnome-terminator/terminator";
license = licenses.gpl2;
maintainers = with maintainers; [ bjornfor ];
platforms = platforms.linux;
};
}