aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/misc/rmlint/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/rmlint/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/rmlint/default.nix57
1 files changed, 49 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/tools/misc/rmlint/default.nix b/nixpkgs/pkgs/tools/misc/rmlint/default.nix
index cbe1f7d407c..936c78b695d 100644
--- a/nixpkgs/pkgs/tools/misc/rmlint/default.nix
+++ b/nixpkgs/pkgs/tools/misc/rmlint/default.nix
@@ -1,30 +1,71 @@
-{ stdenv, fetchFromGitHub
-, gettext, pkgconfig, scons
-, glib, json-glib, libelf, sphinx, utillinux }:
+{ stdenv
+, cairo
+, fetchFromGitHub
+, gettext
+, glib
+, gobject-introspection
+, gtksourceview3
+, json-glib
+, libelf
+, makeWrapper
+, pango
+, pkgconfig
+, polkit
+, python3
+, scons
+, sphinx
+, utillinux
+, wrapGAppsHook
+, withGui ? false }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "rmlint";
- version = "2.9.0";
+ version = "2.10.1";
src = fetchFromGitHub {
owner = "sahib";
repo = "rmlint";
rev = "v${version}";
- sha256 = "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i";
+ sha256 = "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x";
};
CFLAGS="-I${stdenv.lib.getDev utillinux}/include";
nativeBuildInputs = [
- pkgconfig sphinx gettext scons
+ pkgconfig
+ sphinx
+ gettext
+ scons
+ ] ++ stdenv.lib.optionals withGui [
+ makeWrapper
+ wrapGAppsHook
];
buildInputs = [
- glib json-glib libelf utillinux
+ glib
+ json-glib
+ libelf
+ utillinux
+ ] ++ stdenv.lib.optionals withGui [
+ cairo
+ gobject-introspection
+ gtksourceview3
+ pango
+ polkit
+ python3
+ python3.pkgs.pygobject3
];
- prefixKey = "--prefix=";
+ # 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})")
+ '';
meta = {
description = "Extremely fast tool to remove duplicates and other lint from your filesystem";