nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 expat,
7 gettext,
8 gtk3,
9 libconfuse,
10 makeWrapper,
11 pcre2,
12 pkg-config,
13 vte,
14 nixosTests,
15}:
16
17stdenv.mkDerivation (finalAttrs: {
18 pname = "tilda";
19 version = "2.0.0";
20
21 src = fetchFromGitHub {
22 owner = "lanoxx";
23 repo = "tilda";
24 rev = "tilda-${finalAttrs.version}";
25 hash = "sha256-Gseti810JwhYQSaGdE2KRRqnwNmthNBiFvXH9DyVpak=";
26 };
27
28 nativeBuildInputs = [
29 autoreconfHook
30 makeWrapper
31 pkg-config
32 ];
33
34 buildInputs = [
35 gettext
36 gtk3
37 libconfuse
38 pcre2
39 vte
40 ];
41
42 # ugly hack for xgettext to work during build
43 env.LD_LIBRARY_PATH = "${lib.getLib expat}/lib";
44
45 # with -std=c99, the build fails due to implicit function declaration errors
46 # for the popen() and pclose() calls in src/tilda-lock-files.c
47 postPatch = ''
48 substituteInPlace configure.ac --replace-fail -std=c99 -std=gnu99
49 '';
50
51 # The config locking scheme relies on the binary being called "tilda"
52 # (`pgrep -C tilda`), so a simple `wrapProgram` won't suffice:
53 postInstall = ''
54 mkdir $out/bin/wrapped
55 mv "$out/bin/tilda" "$out/bin/wrapped/tilda"
56 makeWrapper "$out/bin/wrapped/tilda" "$out/bin/tilda" \
57 --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
58 '';
59
60 passthru.tests.test = nixosTests.terminal-emulators.tilda;
61
62 meta = {
63 homepage = "https://github.com/lanoxx/tilda/";
64 description = "Gtk based drop down terminal for Linux and Unix";
65 mainProgram = "tilda";
66 license = lib.licenses.gpl3Plus;
67 maintainers = [ ];
68 platforms = lib.platforms.linux;
69 };
70})