From 5357e6d26ea99a27e7be72f5e44bcff21fff37cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sun, 2 Sep 2018 01:46:45 -0300 Subject: [PATCH] deepin-gettext-tools: init at 1.0.8 (#45926) --- .../deepin/deepin-gettext-tools/default.nix | 46 +++++++++++++++++++ pkgs/desktops/deepin/default.nix | 1 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/desktops/deepin/deepin-gettext-tools/default.nix diff --git a/pkgs/desktops/deepin/deepin-gettext-tools/default.nix b/pkgs/desktops/deepin/deepin-gettext-tools/default.nix new file mode 100644 index 000000000000..e275429b3951 --- /dev/null +++ b/pkgs/desktops/deepin/deepin-gettext-tools/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchFromGitHub, gettext, python3Packages, perlPackages }: + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "deepin-gettext-tools"; + version = "1.0.8"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "03cwa82dd14a31v44jd3z0kpiri6g21ar4f48s8ph78nvjy55880"; + }; + + nativeBuildInputs = [ + python3Packages.wrapPython + ]; + + buildInputs = [ + gettext + perlPackages.perl + perlPackages.XMLLibXML + perlPackages.ConfigTiny + python3Packages.python + ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + postPatch = '' + sed -e 's/sudo cp/cp/' -i src/generate_mo.py + ''; + + postFixup = '' + wrapPythonPrograms + wrapPythonProgramsIn "$out/lib/${pname}" + wrapProgram $out/bin/deepin-desktop-ts-convert --set PERL5LIB $PERL5LIB + ''; + + meta = with stdenv.lib; { + description = "Deepin Internationalization utilities"; + homepage = https://github.com/linuxdeepin/deepin-gettext-tools; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo ]; + }; +} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 42a4b1989ca4..e9406fc1a692 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -4,6 +4,7 @@ let packages = self: with self; { dde-qt-dbus-factory = callPackage ./dde-qt-dbus-factory { }; + deepin-gettext-tools = callPackage ./deepin-gettext-tools { }; deepin-gtk-theme = callPackage ./deepin-gtk-theme { }; deepin-icon-theme = callPackage ./deepin-icon-theme { }; deepin-terminal = callPackage ./deepin-terminal {