taffybar / taffybar

A gtk based status bar for tiling window managers such as XMonad
BSD 3-Clause "New" or "Revised" License
696 stars 136 forks source link

Somehow document how to make cabal new-repl work with nix shell #556

Open colonelpanic8 opened 2 years ago

colonelpanic8 commented 2 years ago

See https://github.com/NixOS/nixpkgs/issues/56860

cabal configure $(tr <<< "$NIX_LDFLAGS" ' ' '\n' | sed 's|-L|--extra-lib-dirs=|;t;d')

seems to work

ParetoOptimalDev commented 1 year ago

Even with that command I get this as of 253c10f:

$ cabal configure $(tr <<< "$NIX_LDFLAGS" ' ' '\n' | sed 's|-L|--extra-lib-dirs=|;t;d') && cabal build
'cabal.project.local' already exists, backing it up to 'cabal.project.local~'.
Build profile: -w ghc-9.2.4 -O1
In order, the following will be built (use -v for more details):
 - taffybar-4.0.0 (lib) (first run)
 - taffybar-4.0.0 (exe:taffybar) (first run)
Configuring library for taffybar-4.0.0..
Error: .cabal-wrapped:
'/nix/store/v73ppkjk196bwsjm6yy9yv80bdq7q68v-pkg-config-wrapper-0.29.2/bin/pkg-config'
exited with an error:
Package libdeflate was not found in the pkg-config search path.
Perhaps you should add the directory containing `libdeflate.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libdeflate', required by 'libtiff-4', not found

Error: cabal: Failed to build taffybar-4.0.0 (which is required by
exe:taffybar from taffybar-4.0.0). The failure occurred during the configure
step.
colonelpanic8 commented 1 year ago

you probably need to add libdeflate to the build inputs of the shell