Closed op8867555 closed 6 years ago
@op8867555 Are you sure about that first edit? seems to build without it for me.
At least it's needed on my arch box. A clean build after stack setup
gives
> stack build
gtk-sni-tray-0.1.0.0: build (lib + exe)
Preprocessing library for gtk-sni-tray-0.1.0.0..
Building library for gtk-sni-tray-0.1.0.0..
[2 of 2] Compiling StatusNotifier.Tray ( src/StatusNotifier/Tray.hs, .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.1.0/build/StatusNotifier/Tray.o )
/tmp/gtk-sni-tray/src/StatusNotifier/Tray.hs:71:37: error:
• Couldn't match expected type ‘[Char]’ with actual type ‘T.Text’
• In the first argument of ‘pixbufNewFromFile’, namely ‘name’
In the second argument of ‘(<$>)’, namely ‘pixbufNewFromFile name’
In the expression: Just <$> pixbufNewFromFile name
|
71 | then Just <$> pixbufNewFromFile name
| ^^^^
and stack ghci
gives:
*Main StatusNotifier.Tray> :t GI.GdkPixbuf.Objects.Pixbuf.pixbufNewFromFile
GI.GdkPixbuf.Objects.Pixbuf.pixbufNewFromFile
:: Control.Monad.IO.Class.MonadIO m =>
[Char] -> m GI.GdkPixbuf.Objects.Pixbuf.Pixbuf
Hmm. I think you must have an old version of gi-gdkpixbuf. See:
where the parameter is of type Text.
The weird thing about haskell-gi is that it seems that the maintainer sometimes reuploads versions of the hackage packages, so even though you might have 2.0.15 of this package on your machine, its still an old version. I think the solution might be to include as a dependency a sufficiently new version of haskell-gi. Can you try that?
i.e. does
0714bd1f4d2f39bc17c67093da5f73d4143cd24d work for you?
That's really weird to have two package with same version but different API...
It's work with a haskell-gi-0.21.2
appended in extra-deps
, just took me a while to build. I think it would be better if you bump lts version to 11.6, since haskell-gi-0.21.2 is in lts 11.6.
That's really weird to have two package with same version but different API... @op8867555 Yeah I agree, I think that maybe the package versions are synced to the GI package version that they are built from, and then it is expected that you use the haskell-gi version to control what actually happens to the bindings. Not 100% sure though.
Hi, I found this cool project on reddit. however, I can't build it without modifications below: