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

polybar: 3.4.0 -> 3.4.1 #73218

Merged
merged 3 commits into from
Nov 25, 2019
Merged

polybar: 3.4.0 -> 3.4.1 #73218

merged 3 commits into from
Nov 25, 2019

Conversation

Br1ght0ne
Copy link
Member

@Br1ght0ne Br1ght0ne commented Nov 11, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @afldcr


This change is Reviewable

@samdoshi
Copy link
Contributor

Hi I tried to build this with nix-review pr 73218 but I ran into a few errors:

  1. Your src sha256 hash is wrong, it doesn't take account of fetchSubmodules, see the difference between:
    nix-prefetch-git --rev 3.4.1 https://github.com/polybar/polybar and
    nix-prefetch-git --fetch-submodules --rev 3.4.1 https://github.com/polybar/polybar

  2. xcbproto doesn't contain Python 3 libraries, fixing that is potentially a bit more complex, but one way out is to override it in this derivation.

  3. Less importantly, the upstream URL has changed to https://github.com/polybar/polybar

Anyway I made these changes against master and got a working derivation, hopefully that's useful to you.

diff --git a/pkgs/applications/misc/polybar/default.nix b/pkgs/applications/misc/polybar/default.nix
index 9ca8c696184..5ca2ffc4430 100644
--- a/pkgs/applications/misc/polybar/default.nix
+++ b/pkgs/applications/misc/polybar/default.nix
@@ -1,5 +1,5 @@
 { cairo, cmake, fetchFromGitHub, libXdmcp, libpthreadstubs, libxcb, pcre, pkgconfig
-, python2, stdenv, xcbproto, xcbutil, xcbutilcursor, xcbutilimage
+, python3, stdenv, xcbproto, xcbutil, xcbutilcursor, xcbutilimage
 , xcbutilrenderutil, xcbutilwm, xcbutilxrm, makeWrapper
 
 # optional packages-- override the variables ending in 'Support' to enable or
@@ -24,15 +24,19 @@ assert nlSupport     -> ! iwSupport && libnl         != null;
 assert i3Support     -> ! i3GapsSupport && jsoncpp != null && i3      != null;
 assert i3GapsSupport -> ! i3Support     && jsoncpp != null && i3-gaps != null;
 
+let
+  xcbproto-py3 = xcbproto.override { python = python3; };
+in
+
 stdenv.mkDerivation rec {
     pname = "polybar";
-    version = "3.4.0";
+    version = "3.4.1";
 
     src = fetchFromGitHub {
-      owner = "jaagr";
+      owner = pname;
       repo = pname;
       rev = version;
-      sha256 = "1g3zj0788cdlm8inpl19279bw8zjcy7dzj7q4f1l2d8c8g1jhv0m";
+      sha256 = "1z1m6dxh2i5vsnkzaccb9j02ab05wgmcgig5d0l9w856g5jp3zmy";
       fetchSubmodules = true;
     };
 
@@ -50,7 +54,7 @@ stdenv.mkDerivation rec {
     };
 
     buildInputs = [
-      cairo libXdmcp libpthreadstubs libxcb pcre python2 xcbproto xcbutil
+      cairo libXdmcp libpthreadstubs libxcb pcre python3 xcbproto-py3 xcbutil
       xcbutilcursor xcbutilimage xcbutilrenderutil xcbutilwm xcbutilxrm
 
       (if alsaSupport   then alsaLib       else null)

@Br1ght0ne
Copy link
Member Author

@samdoshi Thanks a lot for your help!

@jonringer
Copy link
Contributor

jonringer commented Nov 17, 2019

do you mind squashing this down to 2 commits?

git rebase -i HEAD~3
# move bottom line up one
# instead of pick on fix build commit, choose squash
# save
# then push

should be the bump, and add as maintainer.
Fixing the build should be included in the bump

Br1ght0ne and others added 2 commits November 17, 2019 11:31
- Replace `python2` with `python3`

Co-authored-by: Sam Doshi <samdoshi@users.noreply.github.com>
@Br1ght0ne
Copy link
Member Author

r? @jonringer

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

nix-review passes on NixOS
diff LGTM
commits LGTM
executables show usage

[5 built, 89 copied (91.7 MiB), 15.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/73218
2 package were built:
polybar polybarFull

@jonringer
Copy link
Contributor

@GrahamcOfBorg build polybar polybarFull

alsa-lib doesn't build on darwin.
@Br1ght0ne
Copy link
Member Author

@GrahamcOfBorg build polybar polybarFull

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/73

@jonringer jonringer merged commit 41677b6 into NixOS:master Nov 25, 2019
@Br1ght0ne
Copy link
Member Author

Thanks everyone! 🎉

@Br1ght0ne Br1ght0ne deleted the polybar-3.4.1 branch November 25, 2019 16:35
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.

5 participants