From be48e33bc31e1354decb4013f8cdc87464c8a019 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 10 Sep 2023 20:55:52 -0300 Subject: [PATCH] tilda: migrate to by-name --- .../ti/tilda/package.nix} | 44 +++++++++++-------- pkgs/top-level/all-packages.nix | 4 -- 2 files changed, 25 insertions(+), 23 deletions(-) rename pkgs/{applications/terminal-emulators/tilda/default.nix => by-name/ti/tilda/package.nix} (62%) diff --git a/pkgs/applications/terminal-emulators/tilda/default.nix b/pkgs/by-name/ti/tilda/package.nix similarity index 62% rename from pkgs/applications/terminal-emulators/tilda/default.nix rename to pkgs/by-name/ti/tilda/package.nix index 01cc4f527a91..031d3225a391 100644 --- a/pkgs/applications/terminal-emulators/tilda/default.nix +++ b/pkgs/by-name/ti/tilda/package.nix @@ -1,40 +1,47 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , autoreconfHook -, pkg-config , expat , gettext -, gtk +, gtk3 , libconfuse -, pcre2 -, vte , makeWrapper +, pcre2 +, pkg-config +, vte , nixosTests }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tilda"; version = "1.5.4"; src = fetchFromGitHub { owner = "lanoxx"; repo = "tilda"; - rev = "${pname}-${version}"; - sha256 = "sha256-uDx28jmjNUyzJbgTJiHbjI9U5mYb9bnfl/9AjbxNUWA="; + rev = "tilda-${finalAttrs.version}"; + hash = "sha256-uDx28jmjNUyzJbgTJiHbjI9U5mYb9bnfl/9AjbxNUWA="; }; - nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ]; + nativeBuildInputs = [ + autoreconfHook + makeWrapper + pkg-config + ]; + buildInputs = [ gettext - gtk + gtk3 libconfuse pcre2 vte ]; - LD_LIBRARY_PATH = "${expat.out}/lib"; # ugly hack for xgettext to work during build + # ugly hack for xgettext to work during build + env.LD_LIBRARY_PATH = "${lib.getLib expat}/lib"; - # The config locking scheme relies on the binary being called "tilda", + # The config locking scheme relies on the binary being called "tilda" # (`pgrep -C tilda`), so a simple `wrapProgram` won't suffice: postInstall = '' mkdir $out/bin/wrapped @@ -45,12 +52,11 @@ stdenv.mkDerivation rec { passthru.tests.test = nixosTests.terminal-emulators.tilda; - meta = with lib; { - description = "A Gtk based drop down terminal for Linux and Unix"; + meta = { homepage = "https://github.com/lanoxx/tilda/"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.AndersonTorres ]; - platforms = platforms.linux; + description = "A Gtk based drop down terminal for Linux and Unix"; + license = lib.licenses.gpl3Plus; + maintainers = [ lib.maintainers.AndersonTorres ]; + platforms = lib.platforms.linux; }; -} - +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4cc39436056d..17c1ff17d383 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3087,10 +3087,6 @@ with pkgs; termonad = callPackage ../applications/terminal-emulators/termonad { }; - tilda = callPackage ../applications/terminal-emulators/tilda { - gtk = gtk3; - }; - tilix = callPackage ../applications/terminal-emulators/tilix { }; tym = callPackage ../applications/terminal-emulators/tym { };