2020-06-14 01:30:18 +02:00
|
|
|
{ stdenv
|
|
|
|
, cairo
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gettext
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtksourceview3
|
|
|
|
, json-glib
|
|
|
|
, libelf
|
|
|
|
, makeWrapper
|
|
|
|
, pango
|
|
|
|
, pkgconfig
|
|
|
|
, polkit
|
|
|
|
, python3
|
|
|
|
, scons
|
|
|
|
, sphinx
|
|
|
|
, utillinux
|
|
|
|
, wrapGAppsHook
|
|
|
|
, withGui ? false }:
|
2013-06-09 20:34:50 +02:00
|
|
|
|
2015-01-26 01:08:05 +01:00
|
|
|
with stdenv.lib;
|
2013-06-09 20:34:50 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "rmlint";
|
2020-06-15 04:42:48 +02:00
|
|
|
version = "2.10.1";
|
2013-06-09 20:34:50 +02:00
|
|
|
|
2017-08-21 18:14:14 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sahib";
|
|
|
|
repo = "rmlint";
|
|
|
|
rev = "v${version}";
|
2020-06-15 04:42:48 +02:00
|
|
|
sha256 = "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x";
|
2013-06-09 20:34:50 +02:00
|
|
|
};
|
|
|
|
|
2018-12-23 22:41:09 +01:00
|
|
|
CFLAGS="-I${stdenv.lib.getDev utillinux}/include";
|
2015-01-26 01:08:05 +01:00
|
|
|
|
2018-12-23 22:41:09 +01:00
|
|
|
nativeBuildInputs = [
|
2020-06-14 01:30:18 +02:00
|
|
|
pkgconfig
|
|
|
|
sphinx
|
|
|
|
gettext
|
|
|
|
scons
|
|
|
|
] ++ stdenv.lib.optionals withGui [
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
2018-12-23 21:43:28 +01:00
|
|
|
];
|
2015-01-26 01:08:05 +01:00
|
|
|
|
2018-12-23 22:41:09 +01:00
|
|
|
buildInputs = [
|
2020-06-14 01:30:18 +02:00
|
|
|
glib
|
|
|
|
json-glib
|
|
|
|
libelf
|
|
|
|
utillinux
|
|
|
|
] ++ stdenv.lib.optionals withGui [
|
|
|
|
cairo
|
|
|
|
gobject-introspection
|
|
|
|
gtksourceview3
|
|
|
|
pango
|
|
|
|
polkit
|
|
|
|
python3
|
|
|
|
python3.pkgs.pygobject3
|
2018-12-23 22:41:09 +01:00
|
|
|
];
|
2015-01-26 01:08:05 +01:00
|
|
|
|
2020-06-14 01:30:18 +02:00
|
|
|
# this doesn't seem to support configureFlags, and appends $out afterwards,
|
|
|
|
# so add the --without-gui in front of it
|
|
|
|
prefixKey = stdenv.lib.optionalString (!withGui) " --without-gui " + "--prefix=";
|
|
|
|
|
|
|
|
# in GUI mode, this shells out to itself, and tries to import python modules
|
|
|
|
postInstall = stdenv.lib.optionalString withGui ''
|
|
|
|
gappsWrapperArgs+=(--prefix PATH : "$out/bin")
|
|
|
|
gappsWrapperArgs+=(--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${python3.pkgs.pygobject3}):$(toPythonPath ${python3.pkgs.pycairo})")
|
|
|
|
'';
|
2013-06-09 20:34:50 +02:00
|
|
|
|
|
|
|
meta = {
|
2015-04-28 10:54:58 +02:00
|
|
|
description = "Extremely fast tool to remove duplicates and other lint from your filesystem";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://rmlint.readthedocs.org";
|
2015-01-26 01:08:05 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.koral ];
|
2013-06-09 20:34:50 +02:00
|
|
|
};
|
|
|
|
}
|