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

@filalex77
Copy link
Contributor

filalex77 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

This comment has been minimized.

Copy link
Contributor

samdoshi commented Nov 12, 2019

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)
@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Nov 12, 2019

@samdoshi Thanks a lot for your help!

@jonringer

This comment has been minimized.

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

@filalex77 filalex77 force-pushed the filalex77:polybar-3.4.1 branch from 24fadb8 to ac6e404 Nov 17, 2019
filalex77 and others added 2 commits Nov 11, 2019
- Replace `python2` with `python3`

Co-authored-by: Sam Doshi <samdoshi@users.noreply.github.com>
@filalex77 filalex77 force-pushed the filalex77:polybar-3.4.1 branch from ac6e404 to d6baaeb Nov 17, 2019
@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Nov 21, 2019

Copy link
Contributor

jonringer left a comment

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

This comment has been minimized.

Copy link
Contributor

jonringer commented Nov 21, 2019

@GrahamcOfBorg build polybar polybarFull

alsa-lib doesn't build on darwin.
@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Nov 22, 2019

@GrahamcOfBorg build polybar polybarFull

@filalex77 filalex77 requested a review from jonringer Nov 22, 2019
@nixos-discourse

This comment has been minimized.

Copy link

nixos-discourse commented Nov 25, 2019

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
17 checks passed
17 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
polybar on aarch64-linux Success
Details
polybar on x86_64-linux Success
Details
polybar, polybarFull on aarch64-linux Success
Details
polybar, polybarFull on x86_64-linux Success
Details
@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Nov 25, 2019

Thanks everyone! 🎉

@filalex77 filalex77 deleted the filalex77:polybar-3.4.1 branch Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.