nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3Packages,
4 fetchurl,
5 gettext,
6 gobject-introspection,
7 wrapGAppsHook3,
8 glib,
9 gtk3,
10 libnotify,
11}:
12
13python3Packages.buildPythonApplication rec {
14 pname = "bleachbit";
15 version = "4.6.0";
16
17 format = "other";
18
19 src = fetchurl {
20 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
21 sha256 = "sha256-UwUphuUeXFy71I+tmKnRH858dPrA2+xDxnG9h26a+kE=";
22 };
23
24 nativeBuildInputs = [
25 gettext
26 gobject-introspection
27 wrapGAppsHook3
28 ];
29
30 buildInputs = [
31 glib
32 gtk3
33 libnotify
34 ];
35
36 propagatedBuildInputs = with python3Packages; [
37 chardet
38 pygobject3
39 requests
40 ];
41
42 # Patch the many hardcoded uses of /usr/share/ and /usr/bin
43 postPatch = ''
44 find -type f -exec sed -i -e 's@/usr/share@${placeholder "out"}/share@g' {} \;
45 find -type f -exec sed -i -e 's@/usr/bin@${placeholder "out"}/bin@g' {} \;
46 find -type f -exec sed -i -e 's@${placeholder "out"}/bin/python3@${python3Packages.python}/bin/python3@' {} \;
47 '';
48
49 dontBuild = true;
50
51 installFlags = [
52 "prefix=${placeholder "out"}"
53 ];
54
55 # Prevent double wrapping from wrapGApps and wrapPythonProgram
56 dontWrapGApps = true;
57 makeWrapperArgs = [
58 "\${gappsWrapperArgs[@]}"
59 ];
60
61 strictDeps = false;
62
63 meta = with lib; {
64 homepage = "https://bleachbit.sourceforge.net";
65 description = "Program to clean your computer";
66 longDescription = "BleachBit helps you easily clean your computer to free space and maintain privacy.";
67 license = licenses.gpl3;
68 maintainers = with maintainers; [
69 leonardoce
70 mbprtpmnr
71 ];
72 mainProgram = "bleachbit";
73 };
74}