From 1390b5809cb1c8869ff5ac687e6968dcaa5da745 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 22 Mar 2019 14:29:50 -0500 Subject: [PATCH 1/4] bleachbit: 2.0 -> 2.2 https://www.bleachbit.org/news/bleachbit-22 --- pkgs/applications/misc/bleachbit/default.nix | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/misc/bleachbit/default.nix b/pkgs/applications/misc/bleachbit/default.nix index f0dce54675c..b2348bbf752 100644 --- a/pkgs/applications/misc/bleachbit/default.nix +++ b/pkgs/applications/misc/bleachbit/default.nix @@ -1,25 +1,26 @@ -{ stdenv, pythonPackages, fetchurl }: +{ stdenv, pythonPackages, fetchurl, gettext }: pythonPackages.buildPythonApplication rec { - name = "bleachbit-${version}"; - version = "2.0"; - - namePrefix = ""; + pname = "bleachbit"; + version = "2.2"; src = fetchurl { - url = "mirror://sourceforge/bleachbit/${name}.tar.bz2"; - sha256 = "0ps98zx4n13q92bq7ykqi6hj3i7brdqgm87i9gk6ibvljp1vxdz9"; + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; + sha256 = "1yj9bc3k6s1aib7znb79h5rybfv691zz4szxkwf9fm9nr0dws603"; }; + nativeBuildInputs = [ gettext ]; buildInputs = [ pythonPackages.wrapPython ]; + # 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' {} \; + ''; + doCheck = false; postInstall = '' - mkdir -p $out/bin - cp bleachbit.py $out/bin/bleachbit - chmod +x $out/bin/bleachbit - - substituteInPlace $out/bin/bleachbit --replace "#!/usr/bin/env python" "#!${pythonPackages.python.interpreter}" + make install SHELL=${stdenv.shell} prefix=${placeholder "out"} ''; propagatedBuildInputs = with pythonPackages; [ pygtk ]; From 575df3a129dc880ea94a85d44c67ec49568927df Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 23 Mar 2019 00:09:16 -0500 Subject: [PATCH 2/4] bleachbit: drop unnecessary wrapPython input Per reviewer feedback, thanks! --- pkgs/applications/misc/bleachbit/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/misc/bleachbit/default.nix b/pkgs/applications/misc/bleachbit/default.nix index b2348bbf752..42bdb078a3d 100644 --- a/pkgs/applications/misc/bleachbit/default.nix +++ b/pkgs/applications/misc/bleachbit/default.nix @@ -9,7 +9,6 @@ pythonPackages.buildPythonApplication rec { }; nativeBuildInputs = [ gettext ]; - buildInputs = [ pythonPackages.wrapPython ]; # Patch the many hardcoded uses of /usr/share/ and /usr/bin postPatch = '' From 34845f2f67154fdee639a28f6e0d34e9538eb9a8 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sun, 24 Mar 2019 21:54:13 -0500 Subject: [PATCH 3/4] bleachbit: use format="other", simplify. Patch by @worldbypeace, during PR review. Thanks! --- pkgs/applications/misc/bleachbit/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/bleachbit/default.nix b/pkgs/applications/misc/bleachbit/default.nix index 42bdb078a3d..c79a98ef716 100644 --- a/pkgs/applications/misc/bleachbit/default.nix +++ b/pkgs/applications/misc/bleachbit/default.nix @@ -3,6 +3,8 @@ pythonPackages.buildPythonApplication rec { pname = "bleachbit"; version = "2.2"; + format = "other"; + src = fetchurl { url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; sha256 = "1yj9bc3k6s1aib7znb79h5rybfv691zz4szxkwf9fm9nr0dws603"; @@ -16,11 +18,13 @@ pythonPackages.buildPythonApplication rec { find -type f -exec sed -i -e 's@/usr/bin@${placeholder "out"}/bin@g' {} \; ''; - doCheck = false; + dontBuild = true; - postInstall = '' - make install SHELL=${stdenv.shell} prefix=${placeholder "out"} - ''; + installFlags = [ "prefix=${placeholder "out"}" ]; + + doCheck = true; + + checkTarget = "tests"; propagatedBuildInputs = with pythonPackages; [ pygtk ]; From 5be54d01c8671cde6f6caec11d5166b6ed675a6e Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 1 Apr 2019 10:26:52 -0500 Subject: [PATCH 4/4] bleachbit: don't run tests, or pretend to do so --- pkgs/applications/misc/bleachbit/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/applications/misc/bleachbit/default.nix b/pkgs/applications/misc/bleachbit/default.nix index c79a98ef716..3f13972de9b 100644 --- a/pkgs/applications/misc/bleachbit/default.nix +++ b/pkgs/applications/misc/bleachbit/default.nix @@ -22,10 +22,6 @@ pythonPackages.buildPythonApplication rec { installFlags = [ "prefix=${placeholder "out"}" ]; - doCheck = true; - - checkTarget = "tests"; - propagatedBuildInputs = with pythonPackages; [ pygtk ]; meta = {