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
xmobar: tzdata patch #73510
xmobar: tzdata patch #73510
Conversation
|
||
# The DateZone xmobar plugin has the hardcoded path /usr/share/zoneinfo | ||
xmobar = overrideCabal super.xmobar (drv: { | ||
preConfigure = "sed -i -e s,/usr/share/zoneinfo,${pkgs.tzdata}/share/zoneinfo, src/Xmobar/Plugins/DateZone.hs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like in nixpkgs, people try to use substituteInPlace
instead of sed
directly.
Could you change this to use substituteInPlace
? If you grep through nixpkgs, you should be able to find a bunch of examples of it being used.
@emmanuelrosa Thanks for this fix! Could you create an issue on the xmobar issue tracker saying that we would like an officially supported way of changing the path to Also, I just checked on my system, and it looks like there is a And then please link to this issue in a comment in the |
I submitted a fix upstream, using TZDIR: https://github.com/jaor/xmobar/pull/411 |
@@ -636,4 +636,9 @@ self: super: builtins.intersectAttrs super { | |||
# need it during the build itself, too. | |||
cairo = addBuildTool super.cairo self.buildHaskellPackages.gtk2hs-buildtools; | |||
pango = disableHardening (addBuildTool super.pango self.buildHaskellPackages.gtk2hs-buildtools) ["fortify"]; | |||
|
|||
# The DateZone xmobar plugin has the hardcoded path /usr/share/zoneinfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting the fix upstream!
Please edit this comment to link to https://github.com/jaor/xmobar/pull/411 so that the nixpkgs haskell maintainers know when this can be removed.
(Or you could just close this PR and wait for an upstream release to fix this problem...)
The DateZone xmobar plugin uses the hard-coded path /usr/share/zoneinfo for timezone information. This change patches DateZone.hs to look up the zoneinfo path in the TZDIR environment variable. Closes NixOS#73152
babdf30
to
e168c9a
Compare
Until upstream releases xmobar 0.32, here's an example of a nixpkgs overlay to install xmobar from upstream's Git master branch:
I'm now using the above instead of this PR. |
The DateZone xmobar plugin uses the hard-coded path /usr/share/zoneinfo
for timezone information. This change patches DateZone.hs to replace the
path with ${pkgs.tzdata}/share/zoneinfo, thus the correct path is set
at compile-time.
Closes #73152
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @