nixpkgs/pkgs/applications/misc/bleachbit/default.nix

72 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
2020-07-07 21:09:49 +00:00
, python3Packages
, fetchurl
, gettext
, gobject-introspection
, wrapGAppsHook
, glib
, gtk3
, libnotify
2021-03-25 07:45:55 +00:00
, scandir ? null
}:
2020-07-07 21:09:49 +00:00
python3Packages.buildPythonApplication rec {
pname = "bleachbit";
2021-09-07 08:56:41 +00:00
version = "4.4.0";
2015-07-10 08:29:51 +00:00
format = "other";
2015-07-10 08:29:51 +00:00
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
2021-09-07 08:56:41 +00:00
sha256 = "0kqqfzq6bh03n7kxb9vd483bqi1cklfvj35a7h4iqk96sq1xv8z6";
2015-07-10 08:29:51 +00:00
};
nativeBuildInputs = [
gettext
gobject-introspection
wrapGAppsHook
];
buildInputs = [
glib
gtk3
libnotify
];
2020-07-07 21:09:49 +00:00
propagatedBuildInputs = with python3Packages; [
chardet
pygobject3
requests
scandir
];
2015-07-10 08:29:51 +00:00
# Patch the many hardcoded uses of /usr/share/ and /usr/bin
postPatch = ''
find -type f -exec sed -i -e 's@/usr/share@${placeholder "out"}/share@g' {} \;
find -type f -exec sed -i -e 's@/usr/bin@${placeholder "out"}/bin@g' {} \;
2021-09-07 08:56:41 +00:00
find -type f -exec sed -i -e 's@${placeholder "out"}/bin/python3@${python3Packages.python}/bin/python3@' {} \;
'';
dontBuild = true;
2015-07-10 08:29:51 +00:00
installFlags = [
"prefix=${placeholder "out"}"
];
2021-09-07 08:56:41 +00:00
# Prevent double wrapping from wrapGApps and wrapPythonProgram
2020-07-07 21:09:49 +00:00
dontWrapGApps = true;
makeWrapperArgs = [
"\${gappsWrapperArgs[@]}"
2020-07-07 21:09:49 +00:00
];
strictDeps = false;
2015-07-10 08:29:51 +00:00
meta = with lib; {
homepage = "http://bleachbit.sourceforge.net";
2015-07-10 08:29:51 +00:00
description = "A program to clean your computer";
longDescription = "BleachBit helps you easily clean your computer to free space and maintain privacy.";
license = licenses.gpl3;
2021-09-07 08:56:41 +00:00
maintainers = with maintainers; [ leonardoce mbprtpmnr ];
2015-07-10 08:29:51 +00:00
};
}