From 1bac24cd463ecbbebc942c02a9b7185078690195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Tue, 18 Dec 2018 23:21:26 -0200 Subject: [PATCH] deepin-screenshot: init at 4.1.8 Co-authored-by: worldofpeace Co-authored-by: Florian Klink --- .../deepin/deepin-screenshot/default.nix | 56 +++++++++++++++++++ pkgs/desktops/deepin/default.nix | 1 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/desktops/deepin/deepin-screenshot/default.nix diff --git a/pkgs/desktops/deepin/deepin-screenshot/default.nix b/pkgs/desktops/deepin/deepin-screenshot/default.nix new file mode 100644 index 0000000000000..e595a47b635da --- /dev/null +++ b/pkgs/desktops/deepin/deepin-screenshot/default.nix @@ -0,0 +1,56 @@ +{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, xdg_utils, qttools, qtx11extras, + dtkcore, dtkwidget, dtkwm, deepin-turbo, deepin-shortcut-viewer, + deepin }: + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "deepin-screenshot"; + version = "4.1.8"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "1zhjchflgws2q74b9fgdjy2wzifjhimnrrq1sxlv395793xv8lrr"; + }; + + nativeBuildInputs = [ + cmake + pkgconfig + qttools + deepin.setupHook + ]; + + buildInputs = [ + deepin-shortcut-viewer + deepin-turbo + dtkcore + dtkwidget + dtkwm + qtx11extras + ]; + + patches = [ + (fetchpatch { + url = https://github.com/linuxdeepin/deepin-screenshot/pull/52/commits/e14508b223fd9965854ed41c944cea2ea19e6e0c.patch; + sha256 = "18zvz98z3hr8pcdyb706za6h2nwx23zsjb1hgyp21ycinhzr9j9h"; + }) + ]; + + postPatch = '' + patchShebangs generate_translations.sh + fixPath ${deepin-turbo} /usr/bin/deepin-turbo-invoker src/dbusservice/com.deepin.Screenshot.service + fixPath $out/bin/deepin-screenshot /usr/bin/deepin-screenshot src/dbusservice/com.deepin.Screenshot.service + substituteInPlace src/mainwindow.cpp --replace '"xdg-open,%1"' '"${xdg_utils}/bin/xdg-open,%1"' + ''; + + passthru.updateScript = deepin.updateScript { inherit name; }; + + meta = with stdenv.lib; { + description = "Easy-to-use screenshot tool for Deepin Desktop Environment"; + homepage = https://github.com/linuxdeepin/deepin-screenshot; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo flokli ]; + }; +} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 019571498ea80..d2ad744929bf9 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -30,6 +30,7 @@ let deepin-metacity = callPackage ./deepin-metacity { }; deepin-movie-reborn = callPackage ./deepin-movie-reborn { }; deepin-mutter = callPackage ./deepin-mutter { }; + deepin-screenshot = callPackage ./deepin-screenshot { }; deepin-shortcut-viewer = callPackage ./deepin-shortcut-viewer { }; deepin-sound-theme = callPackage ./deepin-sound-theme { }; deepin-terminal = callPackage ./deepin-terminal {