nixpkgs/pkgs/by-name/qd/qdirstat/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.5 KiB
Nix
Raw Normal View History

2024-03-13 12:54:57 +03:00
{
lib,
fetchFromGitHub,
libsForQt5,
coreutils,
xdg-utils,
bash,
makeWrapper,
perlPackages,
}:
libsForQt5.mkDerivation rec {
2019-08-14 00:52:01 +03:00
pname = "qdirstat";
2024-01-16 01:07:07 +03:00
version = "1.9";
2017-07-30 12:51:57 +03:00
src = fetchFromGitHub {
owner = "shundhammer";
2024-03-13 12:54:57 +03:00
repo = "qdirstat";
2019-09-09 02:38:31 +03:00
rev = version;
2024-03-13 12:54:57 +03:00
hash = "sha256-pwdmltHDNwUMx1FNOoiXl5Pna0zlKqahmicBCN6UVSU=";
2017-07-30 12:51:57 +03:00
};
2024-03-13 12:54:57 +03:00
nativeBuildInputs = [ makeWrapper ] ++ (with libsForQt5; [ qmake ]);
2017-07-30 12:51:57 +03:00
buildInputs = [ perlPackages.perl ];
2017-07-30 12:51:57 +03:00
2019-11-16 21:27:03 +03:00
postPatch = ''
2017-07-30 12:51:57 +03:00
substituteInPlace scripts/scripts.pro \
2019-01-11 22:31:36 +03:00
--replace /bin/true ${coreutils}/bin/true
2017-07-30 12:51:57 +03:00
2019-01-11 22:31:36 +03:00
for i in src/SysUtil.cpp src/FileSizeStatsWindow.cpp
do
2017-07-30 12:51:57 +03:00
substituteInPlace $i \
2021-02-01 11:05:09 +03:00
--replace /usr/bin/xdg-open ${xdg-utils}/bin/xdg-open
2017-07-30 12:51:57 +03: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 21:27:03 +03:00
qmakeFlags = [ "INSTALL_PREFIX=${placeholder "out"}" ];
2017-07-30 12:51:57 +03:00
2017-07-31 17:06:34 +03:00
postInstall = ''
wrapProgram $out/bin/qdirstat-cache-writer \
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.URI ]}"
2017-07-31 17:06:34 +03:00
'';
meta = with lib; {
2017-07-30 12:51:57 +03:00
description = "Graphical disk usage analyzer";
2024-03-13 12:54:57 +03:00
homepage = "https://github.com/shundhammer/qdirstat";
2021-04-12 18:51:09 +03:00
license = licenses.gpl2Plus;
2024-03-13 12:29:47 +03:00
maintainers = with maintainers; [ donovanglover ];
2017-07-30 12:51:57 +03:00
platforms = platforms.linux;
2023-08-04 22:10:05 +03:00
mainProgram = "qdirstat";
2017-07-30 12:51:57 +03:00
};
}