nixpkgs-suyu/pkgs/applications/misc/qdirstat/default.nix

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

58 lines
1.4 KiB
Nix
Raw Normal View History

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