2020-05-03 20:52:19 +01:00
|
|
|
{ stdenv
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, pkgconfig
|
|
|
|
, qtbase
|
|
|
|
, udisks2-qt5
|
|
|
|
, utillinux
|
|
|
|
, dtkcore
|
|
|
|
, deepin
|
|
|
|
}:
|
2018-10-20 15:02:53 +01:00
|
|
|
|
2019-07-22 03:53:18 +01:00
|
|
|
mkDerivation rec {
|
2018-10-20 15:02:53 +01:00
|
|
|
pname = "deepin-anything";
|
2019-11-12 02:21:10 +00:00
|
|
|
version = "5.0.1";
|
2018-10-20 15:02:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-06-22 13:26:32 +01:00
|
|
|
sha256 = "1kvyffrii4b012f6ld1ih14qrn7gg5cxbdpbkac0wxb22hnz0azm";
|
2018-10-20 15:02:53 +01:00
|
|
|
};
|
|
|
|
|
2020-04-23 18:43:48 +01:00
|
|
|
patches = [
|
|
|
|
# fix compilation error and add support to kernel 5.6
|
|
|
|
# https://github.com/linuxdeepin/deepin-anything/pull/27
|
|
|
|
(fetchpatch {
|
|
|
|
name = "linux-5.6.patch";
|
|
|
|
url = "https://github.com/linuxdeepin/deepin-anything/commit/764b820c2bcd7248993349b32f91043fc58ee958.patch";
|
|
|
|
sha256 = "1ww4xllxc2s04px6fy8wp5cyw54xaz155ry30sqz21vl8awfr36h";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-10-20 15:02:53 +01:00
|
|
|
outputs = [ "out" "modsrc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
deepin.setupHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
dtkcore
|
|
|
|
qtbase
|
|
|
|
udisks2-qt5
|
|
|
|
utillinux
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"DEB_HOST_MULTIARCH="
|
2019-09-03 17:38:57 +01:00
|
|
|
"PREFIX=${placeholder "out"}"
|
2018-10-20 15:02:53 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
searchHardCodedPaths # for debugging
|
|
|
|
fixPath $modsrc /usr/src Makefile
|
|
|
|
fixPath $out /usr Makefile
|
|
|
|
fixPath $out /usr server/tool/tool.pro
|
|
|
|
fixPath $out /etc server/tool/tool.pro
|
|
|
|
fixPath $out /usr/bin \
|
|
|
|
server/tool/deepin-anything-tool.service \
|
|
|
|
server/tool/com.deepin.anything.service \
|
|
|
|
server/monitor/deepin-anything-monitor.service
|
|
|
|
sed -e 's,/lib/systemd,$$PREFIX/lib/systemd,' -i server/monitor/src/src.pro server/tool/tool.pro
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
searchHardCodedPaths $out # for debugging
|
|
|
|
searchHardCodedPaths $modsrc # for debugging
|
|
|
|
'';
|
|
|
|
|
2020-05-03 21:03:55 +01:00
|
|
|
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
2018-10-20 15:02:53 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Deepin file search tool";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/linuxdeepin/deepin-anything";
|
2018-10-20 15:02:53 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ romildo ];
|
|
|
|
};
|
|
|
|
}
|