Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bleachbit: 2.0 -> 2.2 #58152

Merged
merged 4 commits into from Apr 17, 2019
Merged

bleachbit: 2.0 -> 2.2 #58152

merged 4 commits into from Apr 17, 2019

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Mar 22, 2019

Motivation for this change

https://www.bleachbit.org/news/bleachbit-22

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

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"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you drop this entirely and just use makeFlags?

@dtzWill
Copy link
Member Author

dtzWill commented Mar 23, 2019 via email

@dtzWill
Copy link
Member Author

dtzWill commented Mar 23, 2019 via email

@worldofpeace
Copy link
Contributor

worldofpeace commented Mar 23, 2019

@dtzWill I think my comment on in email appears to be different than what I communicated.

For example I suggested to remove wrapPythonnot gettext. and said
"Unneeded as it's done in mk-python-derivation.nix.".

Per reviewer feedback, thanks!
@worldofpeace
Copy link
Contributor

worldofpeace commented Mar 23, 2019

Not AFAICT? Normally yes (and wouldn't need to set SHELL ourselves) but
I don't see a way to do that here.

If that seems wrong or it works for you LMK haha :).

Ahh realized that we should set format to other so it doesn't use the setup.py.
This should fix this I think

diff --git a/pkgs/applications/misc/bleachbit/default.nix b/pkgs/applications/misc/bleachbit/default.nix
index b2348bbf752..7b4b9cd0885 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";
@@ -17,11 +19,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 ];
 

@dtzWill
Copy link
Member Author

dtzWill commented Mar 23, 2019 via email

Patch by @worldbypeace, during PR review.  Thanks!
@worldofpeace
Copy link
Contributor

Don't see the tests running in the output, not sure why. Guess we should just leave that out so it doesn't look confusing.

@worldofpeace
Copy link
Contributor

ping @dtzWill

@dtzWill
Copy link
Member Author

dtzWill commented Apr 1, 2019 via email

@worldofpeace
Copy link
Contributor

Pushed commit disabling tests, sorry for delay. Was hoping to fix them (moving to installCheckPhase = gets them running) but too many small details to fixup so punting on that for now.

On Sun, 31 Mar 2019 21:56:31 -0700, worldofpeace @.***> wrote: ping @dtzWill -- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: #58152 (comment) part: text/html

Looks good. It just needs a squash. I'd try to maybe keep some of the comments on what was done.

Other than that this works 👍 .

@dtzWill dtzWill merged commit 47fc99f into NixOS:master Apr 17, 2019
@dtzWill dtzWill deleted the update/bleachbit-2.2 branch April 17, 2019 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants