Nixpkgs: Taffybar 1.0.0 broken in master

Created on 6 Apr 2018  路  15Comments  路  Source: NixOS/nixpkgs

Issue description

The taffybar package in nixpkgs master cannot build.

Steps to reproduce

  1. Checkout nixpkgs.
  2. nix-env -f . -iA taffybar
installing 'taffybar-with-packages'
these derivations will be built:
  /nix/store/nkbrsnz01lp97i60m59bzrcjqvivacph-gtk-traymanager-1.0.0.drv
  /nix/store/1lkw0v0r6wzl3q0anrz65ysmmgkhmzbm-taffybar-1.0.0.drv
  /nix/store/dk2q2i5h00122pwv96zkx35xid7b910g-ghc-8.2.2-with-packages.drv
  /nix/store/4xhbgnvqcqx6b0bb6q8p89dzgmzqnsyq-taffybar-with-packages.drv
building '/nix/store/nkbrsnz01lp97i60m59bzrcjqvivacph-gtk-traymanager-1.0.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/2pdyyxb4dzhrbpyhq57rwnn8nahahr9f-ghc-8.2.2.
unpacking sources
unpacking source archive /nix/store/4sjcq33a0ki2q8jarlmnx6f7p5r2f818-gtk-traymanager-1.0.0.tar.gz
source root is gtk-traymanager-1.0.0
setting SOURCE_DATE_EPOCH to timestamp 1522710506 of file gtk-traymanager-1.0.0/src/Graphics/UI/Gtk/Misc/TrayManager.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-gtk-traymanager-1.0.0.drv-0/package.conf.d -j1 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /tmp/nix-build-gtk-traymanager-1.0.0.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/ckz4g6akmkfsa2wji1zzd5lm1cbcyb6v-gtk-traymanager-1.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --docdir=/nix/store/zh97vhmccq3nzbgv92jdin1q16ak6xis-gtk-traymanager-1.0.0-doc/share/doc --with-gcc=gcc --package-db=/tmp/nix-build-gtk-traymanager-1.0.0.drv-0/package.conf.d --ghc-option=-j1 --disable-split-objs --enable-library-profiling --profiling-detail=all-functions --disable-profiling --enable-shared --disable-coverage --disable-executable-dynamic --enable-tests --enable-library-vanilla --enable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/s8c50k081m5xdc2lxz0dwimsnm74rlnb-ncurses-6.1/lib --extra-lib-dirs=/nix/store/7fd1hqfrw1w0csfiv3sic09dhcszgbcc-gmp-6.1.2/lib --extra-lib-dirs=/nix/store/s8c50k081m5xdc2lxz0dwimsnm74rlnb-ncurses-6.1/lib --extra-include-dirs=/nix/store/gdlda7gxf1iwg6j0b4m40mg8w4gi2rmw-freetype-2.7.1-dev/include --extra-lib-dirs=/nix/store/gdlda7gxf1iwg6j0b4m40mg8w4gi2rmw-freetype-2.7.1-dev/lib --extra-include-dirs=/nix/store/spxwrxnsf28sq5gdp42xvqac7psvlqya-zlib-1.2.11-dev/include --extra-lib-dirs=/nix/store/spxwrxnsf28sq5gdp42xvqac7psvlqya-zlib-1.2.11-dev/lib --extra-lib-dirs=/nix/store/sghbqqxllij185b0n3i1ckk30yyjng14-zlib-1.2.11/lib --extra-include-dirs=/nix/store/qh7vxajagv1x0q2xzi0bw70s1gscaqb1-bzip2-1.0.6.0.1-dev/include --extra-lib-dirs=/nix/store/qh7vxajagv1x0q2xzi0bw70s1gscaqb1-bzip2-1.0.6.0.1-dev/lib --extra-lib-dirs=/nix/store/khz209lcxylk55hy1qqvk8r8jxjpg01x-bzip2-1.0.6.0.1/lib --extra-include-dirs=/nix/store/k0k1pv36m1himk885kjl7hll8l9nqrmk-libpng-apng-1.6.34-dev/include --extra-lib-dirs=/nix/store/k0k1pv36m1himk885kjl7hll8l9nqrmk-libpng-apng-1.6.34-dev/lib --extra-lib-dirs=/nix/store/04mbknfbjfg0gl7ha7ybmc3nvl7jc1dk-libpng-apng-1.6.34/lib --extra-lib-dirs=/nix/store/vy2vddqwh19nrfnpwlcn3v0gwkjw938m-freetype-2.7.1/lib --extra-include-dirs=/nix/store/brlpfzip5xgm4pgc4nr2rsxc3dv6pggr-fontconfig-2.12.1-dev/include --extra-lib-dirs=/nix/store/brlpfzip5xgm4pgc4nr2rsxc3dv6pggr-fontconfig-2.12.1-dev/lib --extra-lib-dirs=/nix/store/j4f6mgx0gyr9ajqh6w39pfin0f2iy8fz-fontconfig-2.12.1-lib/lib --extra-include-dirs=/nix/store/vfy9c0mdlzkjkrav5bn35kiwaixaaqhg-xproto-7.0.31/include --extra-lib-dirs=/nix/store/vfy9c0mdlzkjkrav5bn35kiwaixaaqhg-xproto-7.0.31/lib --extra-include-dirs=/nix/store/l5kbz6b54kfsjdica384a3534d3hh0l5-libX11-1.6.5-dev/include --extra-lib-dirs=/nix/store/l5kbz6b54kfsjdica384a3534d3hh0l5-libX11-1.6.5-dev/lib --extra-include-dirs=/nix/store/7yqwvihjl6c8vj99nd7m26jjj32pfkci-libxcb-1.12-dev/include --extra-lib-dirs=/nix/store/7yqwvihjl6c8vj99nd7m26jjj32pfkci-libxcb-1.12-dev/lib --extra-lib-dirs=/nix/store/g4yvi8gwm8rzmpz1iv434vijn3dxr9lq-libxcb-1.12/lib --extra-include-dirs=/nix/store/qmkyisx58n3xqg9lqwa6qvyzzw3vpszn-kbproto-1.0.7/include --extra-lib-dirs=/nix/store/qmkyisx58n3xqg9lqwa6qvyzzw3vpszn-kbproto-1.0.7/lib --extra-lib-dirs=/nix/store/m991w0ib2x6sdc67favv0nmavgy7bghh-libX11-1.6.5/lib --extra-include-dirs=/nix/store/2l0l7zb5mc9shs5jjbblcw5bmwwcjw1x-libXt-1.1.5-dev/include --extra-lib-dirs=/nix/store/2l0l7zb5mc9shs5jjbblcw5bmwwcjw1x-libXt-1.1.5-dev/lib --extra-include-dirs=/nix/store/sx2c626g9ln55304rcqyh46vnz8b5w2v-libSM-1.2.2-dev/include --extra-lib-dirs=/nix/store/sx2c626g9ln55304rcqyh46vnz8b5w2v-libSM-1.2.2-dev/lib --extra-include-dirs=/nix/store/nn97d4zpy5dz7krhh1gqyndzi8bb9yi8-libICE-1.0.9-dev/include --extra-lib-dirs=/nix/store/nn97d4zpy5dz7krhh1gqyndzi8bb9yi8-libICE-1.0.9-dev/lib --extra-lib-dirs=/nix/store/xnfxlm115qfiskxvhy6v5dr7gxnjj85y-libICE-1.0.9/lib --extra-lib-dirs=/nix/store/wlgijr55nyy5dl5fklrjvn0n3vcsh0if-libSM-1.2.2/lib --extra-lib-dirs=/nix/store/0963byncgdnmdbbddwww62f0qxagwkcn-libXt-1.1.5/lib --extra-include-dirs=/nix/store/4zjy7ks07blr9j1i9hzlxx4zcgzhifr2-libXft-2.3.2-dev/include --extra-lib-dirs=/nix/store/4zjy7ks07blr9j1i9hzlxx4zcgzhifr2-libXft-2.3.2-dev/lib --extra-include-dirs=/nix/store/3drzd32ig5gbn2plvfvnivjpbbna2if3-libXrender-0.9.10-dev/include --extra-lib-dirs=/nix/store/3drzd32ig5gbn2plvfvnivjpbbna2if3-libXrender-0.9.10-dev/lib --extra-include-dirs=/nix/store/kjlml6wgbpyczf2x6yqd1k4hpp8dqbfl-renderproto-0.11.1/include --extra-lib-dirs=/nix/store/kjlml6wgbpyczf2x6yqd1k4hpp8dqbfl-renderproto-0.11.1/lib --extra-include-dirs=/nix/store/kjlml6wgbpyczf2x6yqd1k4hpp8dqbfl-renderproto-0.11.1/include --extra-lib-dirs=/nix/store/kjlml6wgbpyczf2x6yqd1k4hpp8dqbfl-renderproto-0.11.1/lib --extra-lib-dirs=/nix/store/rahr8914mspchf6lg2zcnx095k47jmni-libXrender-0.9.10/lib --extra-lib-dirs=/nix/store/4gac2i1wi7g3a4icdm25sxcmm32gczmb-libXft-2.3.2/lib --extra-include-dirs=/nix/store/3lzy99xfv5vv39wb468x0chqy5qk8w9g-libXext-1.3.3-dev/include --extra-lib-dirs=/nix/store/3lzy99xfv5vv39wb468x0chqy5qk8w9g-libXext-1.3.3-dev/lib --extra-include-dirs=/nix/store/v0jdxxgj2la1px6jgnr0jvw378p04zka-libXau-1.0.8-dev/include --extra-lib-dirs=/nix/store/v0jdxxgj2la1px6jgnr0jvw378p04zka-libXau-1.0.8-dev/lib --extra-lib-dirs=/nix/store/2prgw4xa4q9j3sww0psh265cbfqdhf9r-libXau-1.0.8/lib --extra-include-dirs=/nix/store/aqivg8wqhsljjw0n5yw73p3swi2fr6x5-xextproto-7.3.0/include --extra-lib-dirs=/nix/store/aqivg8wqhsljjw0n5yw73p3swi2fr6x5-xextproto-7.3.0/lib --extra-lib-dirs=/nix/store/nh74k3kzdn4dlxgcaqx4if429ayza890-libXext-1.3.3/lib
Configuring gtk-traymanager-1.0.0...
Dependency base >3 && <5: using base-4.10.1.0
Dependency glib >=0.12.1 && <0.15: using glib-0.13.5.0
Dependency gtk3 -any: using gtk3-0.14.8
CallStack (from HasCallStack):
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1507:37 in Cabal-2.0.1.0:Distribution.Simple.Configure
  configurePkgconfigPackages, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:595:7 in Cabal-2.0.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:570:20 in Cabal-2.0.1.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.0.1.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:174:19 in Cabal-2.0.1.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:119:27 in Cabal-2.0.1.0:Distribution.Simple
  defaultMain, called at Setup.hs:2:8 in main:Main
Setup: The pkg-config package 'gtk+-3.0' is required but it could not be
found.
builder for '/nix/store/nkbrsnz01lp97i60m59bzrcjqvivacph-gtk-traymanager-1.0.0.drv' failed with exit code 1
cannot build derivation '/nix/store/dk2q2i5h00122pwv96zkx35xid7b910g-ghc-8.2.2-with-packages.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/4xhbgnvqcqx6b0bb6q8p89dzgmzqnsyq-taffybar-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/4xhbgnvqcqx6b0bb6q8p89dzgmzqnsyq-taffybar-with-packages.drv' failed

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.32, NixOS, 18.03.131802.4b4bbce199d (Impala)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.0
  • channels(root): "nixos-18.03.131802.4b4bbce199d"
  • channels(judson): "nixpkgs-18.09pre134727.d0d05024d10"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
bug haskell

All 15 comments

With this change to pkgs/development/haskell-modules/hackage-packages.nix:

   "gtk-traymanager" = callPackage
-    ({ mkDerivation, base, glib, gtk3, x11 }:
+    ({ mkDerivation, base, glib, gtk3, x11, gnome3 }:
      mkDerivation {
        pname = "gtk-traymanager";
        version = "1.0.0";
        sha256 = "1sg2f8pmnh2xrnra8dx46q9jfy32dlbrmk2hamam8g3i5qsvd0f7";
        libraryHaskellDepends = [ base glib gtk3 ];
-       libraryPkgconfigDepends = [ x11 ];
+       libraryPkgconfigDepends = [ x11 gnome3.gtk ];
        homepage = "http://github.com/travitch/gtk-traymanager";

I get https://gist.github.com/35dc774aadab370cf57733946325d94c which is more promising, but I can't get past the build errors.

You can use the top two commits from here as a workaround:
https://github.com/averelld/nixpkgs/commits/taffybar-fixes (update: removed redundant compiler flag)

I didn't make a PR (anyone feel free), because of the auto-generated hackage-packages.nix, but there are several tiny problems:

  • gtk-traymanager on hackage was probably manually uploaded, it is simply missing an include from the corresponding git repo (and some whitespace errors), that is the patch file
  • there are deprecation-warnings which become errors (disabled via patch)
  • gtk3 is needed as system-package for pkg-config and the identically-named haskell package (see derivation changes with "system-gtk3")
  • taffybar needs a newer dbus (1_0_1)
  • taffybar has haddock errors (the comments need to precede the parameters directly), so i just disable haddock

However, this taffybar binary is tested and works :)

Ping @peti

You can do something like

  taffybar = ((overrideCabal super.taffybar (drv: {
    libraryPkgconfigDepends = [ pkgs.gtk3 ];
  })).overrideScope (self: super: {
    dbus = self.dbus_1_0_1;
  }));

in pkgs/development/haskell-modules/configuration-common.nix. Maybe keep the doJailbreak.

It would be also nice to open an issue upstream so they could fix the package on Hackage.

Thanks @averelld ! I've got a build of Taffybar now... I like that I can get it on two monitors. I wish I could figure out how to make the text a bit more legible though...

No problem. As a starting point, I have updated the branch with the above suggestions, thanks @jtojnar , that is easier, and good to know.

Regarding legibility, apparently they use css now instead of the old rc, so maybe try putting this default in your ~/.config/taffybar/ and adjusting the font(size).

Does someone has a solution using overlays ?
I am doing something like this (or variant of):

self: super:

let
  hlib = super.haskell.lib;
in
{
  haskellPackages = super.haskellPackages.override {
    overrides =  hpkgs: _hpkgs: {
      taffybar = hlib.dontHaddock (hlib.doJailbreak _hpkgs.taffybar);
      taffybar_1 =((hlib.overrideCabal _hpkgs.taffybar (drv: {
       libraryPkgconfigDepends = [ self.gtk3 ];
     })).overrideScope (self: super: {
       dbus = self.dbus_1_0_1;
     }));
    };
  };
}

I can't get over the gtk3+ error:

Setup: The pkg-config package 'gtk+-3.0' is required but it could not be

At the configuration step of the gtk-traymanager
```

Oh sorry I didn't realize there were 2 packages involved. Will have another try later on.

@PierreR it should work with the let declaration. Otherwise you would also need to make pkgs.taffybarrefer to pkgs.haskellPackages.taffybar_1.

@averelld is it your plan now to issue a PR for this? If not, I'll try to cherry-pick into something.

I have no plans for a PR, the packages have already been fixed on hackage, no patching is necessary. Versions have to be bumped to 1.0.1 for each. So maybe all that is required, is waiting for the next hackage-packages update (and probably the gtk3/dbus overrides).

This issue should not be closed. Taffybar is still broken in nixpkgs, which does not yet have the latest taffybar or gtk-traymanager versions. If the best solution is indeed what @averelld proposes and to wait until the hackage packages are updated, then fine. But this issue is still open until that happens.

@johnchandlerburnham The issue was fixed on master branch. Generally, issues are closed once a fix is merged into a source code repository, they do not wait for a new release (or in our case channel bump.

@jtojnar That's reasonable. When do you think this fix will make it into a channel bump?

For info, there is a memory leak in taffybar-1.0.1. The best would be to wait for 1.0.2 before pushing the fix to 18.03 but it currently doesn't build in master because of a dependency failure (see https://github.com/NixOS/nixpkgs/issues/37724)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomberek picture tomberek  路  3Comments

matthiasbeyer picture matthiasbeyer  路  3Comments

edolstra picture edolstra  路  3Comments

sid-kap picture sid-kap  路  3Comments

retrry picture retrry  路  3Comments