2017-07-30 10:51:57 +01:00
|
|
|
{ stdenv, fetchFromGitHub, qmake
|
2017-07-31 15:06:34 +01:00
|
|
|
, coreutils, xdg_utils, bash
|
2019-08-07 10:20:03 +01:00
|
|
|
, makeWrapper, perlPackages, mkDerivation }:
|
2017-07-30 10:51:57 +01:00
|
|
|
|
|
|
|
let
|
2019-08-06 01:29:58 +01:00
|
|
|
version = "1.6";
|
2019-08-07 10:20:03 +01:00
|
|
|
in mkDerivation rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "qdirstat";
|
|
|
|
inherit version;
|
2017-07-30 10:51:57 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shundhammer";
|
|
|
|
repo = "qdirstat";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2019-08-06 01:29:58 +01:00
|
|
|
sha256 = "0q4ccjmlbqifg251kyxwys8wspdskr8scqhacyfrs9cmnjxcjqan";
|
2017-07-30 10:51:57 +01:00
|
|
|
};
|
|
|
|
|
2017-07-31 15:06:34 +01:00
|
|
|
nativeBuildInputs = [ qmake makeWrapper ];
|
2017-07-30 10:51:57 +01:00
|
|
|
|
2018-12-15 03:50:31 +00:00
|
|
|
buildInputs = [ perlPackages.perl ];
|
2017-07-30 10:51:57 +01:00
|
|
|
|
2019-11-16 18:27:03 +00:00
|
|
|
postPatch = ''
|
2017-07-30 10:51:57 +01:00
|
|
|
substituteInPlace scripts/scripts.pro \
|
2019-01-11 19:31:36 +00:00
|
|
|
--replace /bin/true ${coreutils}/bin/true
|
2017-07-30 10:51:57 +01:00
|
|
|
|
2019-01-11 19:31:36 +00:00
|
|
|
for i in src/SysUtil.cpp src/FileSizeStatsWindow.cpp
|
2017-07-30 13:16:02 +01:00
|
|
|
do
|
2017-07-30 10:51:57 +01:00
|
|
|
substituteInPlace $i \
|
2017-07-30 13:16:02 +01:00
|
|
|
--replace /usr/bin/xdg-open ${xdg_utils}/bin/xdg-open
|
2017-07-30 10:51:57 +01:00
|
|
|
done
|
|
|
|
for i in src/Cleanup.cpp src/cleanup-config-page.ui
|
|
|
|
do
|
|
|
|
substituteInPlace $i \
|
|
|
|
--replace /bin/bash ${bash}/bin/bash \
|
|
|
|
--replace /bin/sh ${bash}/bin/sh
|
|
|
|
done
|
|
|
|
substituteInPlace src/StdCleanup.cpp \
|
|
|
|
--replace /bin/bash ${bash}/bin/bash
|
|
|
|
'';
|
2019-11-16 18:27:03 +00:00
|
|
|
|
|
|
|
qmakeFlags = [ "INSTALL_PREFIX=${placeholder "out"}" ];
|
2017-07-30 10:51:57 +01:00
|
|
|
|
2017-07-31 15:06:34 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/qdirstat-cache-writer \
|
2018-12-15 03:50:31 +00:00
|
|
|
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.URI ]}"
|
2017-07-31 15:06:34 +01:00
|
|
|
'';
|
|
|
|
|
2017-07-30 10:51:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Graphical disk usage analyzer";
|
|
|
|
homepage = src.meta.homepage;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ gnidorah ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|