2021-01-25 00:26:54 -08:00
|
|
|
{ lib, fetchFromGitHub, qmake
|
2021-02-01 00:05:09 -08:00
|
|
|
, coreutils, xdg-utils, bash
|
2019-08-07 02:20:03 -07:00
|
|
|
, makeWrapper, perlPackages, mkDerivation }:
|
2017-07-30 02:51:57 -07:00
|
|
|
|
|
|
|
let
|
2019-08-13 14:52:01 -07:00
|
|
|
pname = "qdirstat";
|
2021-04-11 07:20:15 -07:00
|
|
|
version = "1.7.1";
|
2017-07-30 02:51:57 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shundhammer";
|
2020-07-29 08:54:04 -07:00
|
|
|
repo = pname;
|
2019-09-08 16:38:31 -07:00
|
|
|
rev = version;
|
2021-04-11 07:20:15 -07:00
|
|
|
sha256 = "sha256-i1xHMwSnBULJbOA/ykQK9WBd+6TBNBRI9hnU1FDGQlY=";
|
2017-07-30 02:51:57 -07:00
|
|
|
};
|
2020-07-29 08:54:04 -07:00
|
|
|
in
|
|
|
|
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version src;
|
2017-07-30 02:51:57 -07:00
|
|
|
|
2017-07-31 07:06:34 -07:00
|
|
|
nativeBuildInputs = [ qmake makeWrapper ];
|
2017-07-30 02:51:57 -07:00
|
|
|
|
2018-12-14 19:50:31 -08:00
|
|
|
buildInputs = [ perlPackages.perl ];
|
2017-07-30 02:51:57 -07:00
|
|
|
|
2019-11-16 10:27:03 -08:00
|
|
|
postPatch = ''
|
2017-07-30 02:51:57 -07:00
|
|
|
substituteInPlace scripts/scripts.pro \
|
2019-01-11 11:31:36 -08:00
|
|
|
--replace /bin/true ${coreutils}/bin/true
|
2017-07-30 02:51:57 -07:00
|
|
|
|
2019-01-11 11:31:36 -08:00
|
|
|
for i in src/SysUtil.cpp src/FileSizeStatsWindow.cpp
|
2017-07-30 05:16:02 -07:00
|
|
|
do
|
2017-07-30 02:51:57 -07:00
|
|
|
substituteInPlace $i \
|
2021-02-01 00:05:09 -08:00
|
|
|
--replace /usr/bin/xdg-open ${xdg-utils}/bin/xdg-open
|
2017-07-30 02:51:57 -07: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 10:27:03 -08:00
|
|
|
|
|
|
|
qmakeFlags = [ "INSTALL_PREFIX=${placeholder "out"}" ];
|
2017-07-30 02:51:57 -07:00
|
|
|
|
2017-07-31 07:06:34 -07:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/qdirstat-cache-writer \
|
2018-12-14 19:50:31 -08:00
|
|
|
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.URI ]}"
|
2017-07-31 07:06:34 -07:00
|
|
|
'';
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2017-07-30 02:51:57 -07:00
|
|
|
description = "Graphical disk usage analyzer";
|
|
|
|
homepage = src.meta.homepage;
|
2021-04-12 08:51:09 -07:00
|
|
|
license = licenses.gpl2Plus;
|
2021-04-28 22:21:13 -07:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-07-30 02:51:57 -07:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|