Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/maintainers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
vdemeester = "Vincent Demeester <vincent@sbr.pm>";
velovix = "Tyler Compton <xaviosx@gmail.com>";
veprbl = "Dmitry Kalinkin <veprbl@gmail.com>";
vidbina = "David Asabina <vid@bina.me>";
vifino = "Adrian Pistol <vifino@tty.sh>";
Expand Down
44 changes: 44 additions & 0 deletions pkgs/applications/misc/lxterminal/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ stdenv, fetchurl, automake, autoconf, intltool, pkgconfig, gtk2, vte
, libxslt, docbook_xml_dtd_412, docbook_xml_xslt, libxml2, findXMLCatalogs
, buildSingleXMLCatalog
}:

let version = "0.3.1"; in

stdenv.mkDerivation rec {
name = "lxterminal-${version}";

src = fetchurl {
url = "https://github.com/lxde/lxterminal/archive/${version}.tar.gz";
sha256 = "e91f15c8a726d5c13227263476583137a2639d4799c021ca0726c9805021b54c";
};

configureFlags = [
"--enable-man"
"--with-xml-catalog=../catalog.xml" # Generated by buildSingleXMLCatalog

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternately, it is possible to patch the m4 file to autodetect the catalog from the variable, see for example gnome3.cheese.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know, that makes things a lot easier.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only issue is, the macro is in acinclude.m4 instead of the usual m4/gtkdoc_jh_check_xml_catalog.m4.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, and the m4 file has different contents as well. I ended up generating my own patch.

];

buildInputs = [
automake autoconf intltool pkgconfig gtk2 vte libxslt docbook_xml_dtd_412
docbook_xml_xslt libxml2 findXMLCatalogs buildSingleXMLCatalog
];

preConfigure = ''
./autogen.sh
'';

doCheck = true;

meta = {
description = "The standard terminal emulator of LXDE";
longDescription = ''
LXTerminal is the standard terminal emulator of LXDE. The terminal is a
desktop-independent VTE-based terminal emulator for LXDE without any
unnecessary dependencies.
'';
homepage = https://wiki.lxde.org/en/LXTerminal;
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.velovix ];
platforms = stdenv.lib.platforms.linux;
};
}
21 changes: 21 additions & 0 deletions pkgs/build-support/setup-hooks/build-single-xml-catalog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Creates a single XML catalog that references the catalogs found by
# findXMLCatalogs.
# Useful for situations where only one catalog is expected.
buildSingleXMLCatalog() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better if this takes a single argument which is the output file produced.

echo '<?xml version="1.0"?>' > catalog.xml
echo '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' >> catalog.xml

catalogs=$(echo $XML_CATALOG_FILES | tr " " "\n")
for x in $catalogs
do
echo ' <nextCatalog catalog="'$x'" />' >> catalog.xml
done

echo '</catalog>' >> catalog.xml
}

if [ -z "$buildSingleXMLCatalogHookDone" ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't want this. Environment Hooks are functions applied to every dependency, but buildSingleXMLCatalog takes no argument. Just remove the whole if block and call the function manually (e.g. in preConfigure of the package you are packaging).

buildSingleXMLCatalogHookDone=1

envHooks+=(buildSingleXMLCatalog)
fi
8 changes: 8 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ with pkgs;

findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;

buildSingleXMLCatalog = makeSetupHook {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now has a name parameter we should be using.

deps = [ findXMLCatalogs ];
} ../build-support/setup-hooks/build-single-xml-catalog.sh;

wrapGAppsHook = makeSetupHook {
deps = [ gnome3.dconf.lib gnome3.gtk librsvg makeWrapper ];
} ../build-support/setup-hooks/wrap-gapps-hook.sh;
Expand Down Expand Up @@ -17091,6 +17095,10 @@ with pkgs;
vte = gnome2.vte.override { pythonSupport = true; };
};

lxterminal = callPackage ../applications/misc/lxterminal {
vte = gnome2.vte;
};

deepin-terminal = callPackage ../applications/misc/deepin-terminal {
inherit (gnome3) libgee vte;
wnck = libwnck3;
Expand Down