depot/third_party/nixpkgs/pkgs/desktops/deepin/apps/deepin-draw/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

66 lines
1.3 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, qttools
, pkg-config
, wrapQtAppsHook
, qtbase
, qtsvg
, dtkwidget
, qt5integration
, qt5platform-plugins
}:
stdenv.mkDerivation rec {
pname = "deepin-draw";
version = "5.11.7";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-oryh1b7/78Hp3JclN9vKvfcKRg58nsfGZQvBx6VyJBs";
};
patches = [
(fetchpatch {
name = "chore-use-GNUInstallDirs-in-CmakeLists.patch";
url = "https://github.com/linuxdeepin/deepin-draw/commit/dac714fe603e1b77fc39952bfe6949852ee6c2d5.patch";
sha256 = "sha256-zajxmKkZJT1lcyvPv/PRPMxcstF69PB1tC50gYKDlWA=";
})
];
postPatch = ''
substituteInPlace com.deepin.Draw.service \
--replace "/usr/bin/deepin-draw" "$out/bin/deepin-draw"
'';
nativeBuildInputs = [
cmake
qttools
pkg-config
wrapQtAppsHook
];
buildInputs = [
qtbase
qt5integration
qtsvg
dtkwidget
qt5platform-plugins
];
cmakeFlags = [ "-DVERSION=${version}" ];
strictDeps = true;
meta = with lib; {
description = "Lightweight drawing tool for users to freely draw and simply edit images";
homepage = "https://github.com/linuxdeepin/deepin-draw";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}