2020-09-29 09:23:28 +01:00
|
|
|
{stdenv, python3Packages, fetchpatch, gettext, qt5, fetchFromGitHub}:
|
2019-12-13 15:26:17 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "dupeguru";
|
|
|
|
version = "4.0.4";
|
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arsenetar";
|
|
|
|
repo = "dupeguru";
|
2020-11-01 22:39:49 +00:00
|
|
|
rev = version;
|
2019-12-13 15:26:17 +00:00
|
|
|
sha256 = "0ma4f1c6vmpz8gi4sdy43x1ik7wh42wayvk1iq520d3i714kfcpy";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2020-09-29 09:23:28 +01:00
|
|
|
patches = [
|
|
|
|
# already merged to master, remove next version bump
|
|
|
|
(fetchpatch {
|
|
|
|
name = "remove-m-from-so-var.patch";
|
|
|
|
url = "https://github.com/arsenetar/dupeguru/commit/bd0f53bcbe463c48fe141b73af13542da36d82ba.patch";
|
|
|
|
sha256 = "07iisz8kcr7v8lb21inzj1avlpfhh9k8wcivbd33w49cr3mmnr26";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-12-13 15:26:17 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
python3Packages.pyqt5
|
|
|
|
qt5.wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = with python3Packages; [
|
|
|
|
pyqt5
|
|
|
|
send2trash
|
|
|
|
sphinx
|
|
|
|
polib
|
|
|
|
hsaudiotag3k
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder ''out''}"
|
|
|
|
"NO_VENV=1"
|
|
|
|
];
|
|
|
|
|
|
|
|
# TODO: package pytest-monkeyplus for running tests
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/75054/files#r357690123
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Avoid double wrapping Python programs.
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-10-08 12:52:22 +01:00
|
|
|
# TODO: A bug in python wrapper
|
|
|
|
# see https://github.com/NixOS/nixpkgs/pull/75054#discussion_r357656916
|
2019-12-13 15:26:17 +00:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs="''${qtWrapperArgs[@]}"
|
|
|
|
'';
|
|
|
|
|
2020-10-08 12:52:22 +01:00
|
|
|
# Executable in $out/bin is a symlink to $out/share/dupeguru/run.py
|
|
|
|
# so wrapPythonPrograms hook does not handle it automatically.
|
2019-12-13 15:26:17 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapPythonProgramsIn "$out/share/dupeguru" "$out $pythonPath"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GUI tool to find duplicate files in a system";
|
|
|
|
homepage = "https://github.com/arsenetar/dupeguru";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.novoxudonoser ];
|
|
|
|
};
|
|
|
|
}
|