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
Fix gi vte haskell pkg #44529
Fix gi vte haskell pkg #44529
Conversation
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.
Don't edit hackage-packages.nix
. See the comment at the top of the file.
Hi @peti, thanks for taking a look at this PR. I did see the note at the top of However, I couldn't figure out which file I actually need to edit. Could you point me in the right direction? Or even link me to some documentation that explains the process of editing the Haskell stuff? |
All Haskell-related config files reside in https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/haskell-modules. |
f6188a8
to
6071876
Compare
@peti, after looking around the files under That is just what I've done in the most recent commit. Could you take a look over this and let me know if it looks alright? |
@@ -150,6 +150,7 @@ self: super: builtins.intersectAttrs super { | |||
|
|||
# Add necessary reference to gtk3 package | |||
gi-dbusmenugtk3 = addPkgconfigDepend super.gi-dbusmenugtk3 pkgs.gtk3; | |||
gi-vte = addPkgconfigDepend (super.gi-vte.override { vte = pkgs.gnome3.vte; }) pkgs.gnome3.gtk; |
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.
If you pass the gnome3 version of vte
as an argument, then the call to addPkgconfigDepend
is redundant because vte
already is listed as a dependency. So the inner override should be enough here.
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.
Would not it be better to add vte-2.91
to https://github.com/NixOS/cabal2nix/blob/master/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.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.
@peti thanks for taking another look at this.
If all I do is the inner override of the version of vte
(and not the outter addPkgconfigDepend
of gtk
) then gi-vte
gets an error while building:
$ NIX_PATH=".." nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [pkgs.gi-vte])"
these derivations will be built:
/nix/store/637qv7q7qxpx8l3abx1xbkpk799sg8j7-gi-vte-2.91.17.drv
/nix/store/anvs1065djl8f5r60vzbzmy3hgbyhymh-ghc-8.4.3-with-packages.drv
building '/nix/store/637qv7q7qxpx8l3abx1xbkpk799sg8j7-gi-vte-2.91.17.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/yc8an71h8cah8w6fw0xykjxl68a8j1h7-ghc-8.4.3.
ignoring (possibly broken) abi-depends field for packages
ignoring (possibly broken) abi-depends field for packages
unpacking sources
unpacking source archive /nix/store/hhikx5nciaprryaym4c47ckydzcvd5m5-gi-vte-2.91.17.tar.gz
source root is gi-vte-2.91.17
setting SOURCE_DATE_EPOCH to timestamp 1515607667 of file gi-vte-2.91.17/Vte.overrides
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-gi-vte-2.91.17.drv-0/setup-package.conf.d -j1 -threaded
[1 of 1] Compiling Main ( Setup.hs, /tmp/nix-build-gi-vte-2.91.17.drv-0/Main.o )
Linking Setup ...
configuring
configureFlags: --verbose --prefix=/nix/store/pxwjhxi161hjksgygfqks0z2qr7xava7-gi-vte-2.91.17 --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=gcc --package-db=/tmp/nix-build-gi-vte-2.91.17.drv-0/package.conf.d --ghc-option=-j1 --disable-split-objs --enable-library-profiling --profiling-detail=all-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --enable-library-vanilla --enable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/3cnh0n698w18l5g933wrx22zvkhcj8ik-ncurses-6.1/lib --extra-lib-dirs=/nix/store/bi9nx8f8kl8apgd544hkx2dsvlvr4zix-gmp-6.1.2/lib --extra-include-dirs=/nix/store/5qizrlg2lvg5y2k9z2y0gjbmndndg6cv-vte-0.52.2/include --extra-lib-dirs=/nix/store/5qizrlg2lvg5y2k9z2y0gjbmndndg6cv-vte-0.52.2/lib --extra-include-dirs=/nix/store/vardkjd0j4ibxs6zkiwywb9zs85jf5ya-gnutls-3.6.2-dev/include --extra-lib-dirs=/nix/store/vardkjd0j4ibxs6zkiwywb9zs85jf5ya-gnutls-3.6.2-dev/lib --extra-include-dirs=/nix/store/jv6ldbzn0mk7hskxkirnbjlpkfig25iv-nettle-3.4-dev/include --extra-lib-dirs=/nix/store/jv6ldbzn0mk7hskxkirnbjlpkfig25iv-nettle-3.4-dev/lib --extra-include-dirs=/nix/store/hfb8mwwdacrdr25y1d1hila5f678x0a7-gmp-6.1.2-dev/include --extra-lib-dirs=/nix/store/bi9nx8f8kl8apgd544hkx2dsvlvr4zix-gmp-6.1.2/lib --extra-lib-dirs=/nix/store/vpq1l5g3m3zqa20ssmhsay68jn0ny8l1-nettle-3.4/lib --extra-lib-dirs=/nix/store/vjkc4y6vp3g76bx6b7vsy69nfayy0m05-gnutls-3.6.2/lib --extra-include-dirs=/nix/store/h7aiis2rjnvxmw0fy98jqrb3z6vwgrzh-pcre2-10.31-dev/include --extra-lib-dirs=/nix/store/h7aiis2rjnvxmw0fy98jqrb3z6vwgrzh-pcre2-10.31-dev/lib --extra-lib-dirs=/nix/store/k4mnyqb8209qqv1ipcfjk9zdbp8bjxpr-pcre2-10.31/lib --extra-include-dirs=/nix/store/9a86wy64xwvq8lhgh5ib46f9gzja9lgi-gobject-introspection-1.56.0-dev/include --extra-lib-dirs=/nix/store/9a86wy64xwvq8lhgh5ib46f9gzja9lgi-gobject-introspection-1.56.0-dev/lib --extra-include-dirs=/nix/store/jx5j4h8szw002ijmlzxl91hglfh08hc1-libffi-3.2.1-dev/include --extra-lib-dirs=/nix/store/jx5j4h8szw002ijmlzxl91hglfh08hc1-libffi-3.2.1-dev/lib --extra-lib-dirs=/nix/store/rlg88dc96j16bycaislwxnki4cyknax9-libffi-3.2.1/lib --extra-include-dirs=/nix/store/l1v16k68v3njjw281fbfk20zxsb52q35-glib-2.56.0-dev/include --extra-lib-dirs=/nix/store/l1v16k68v3njjw281fbfk20zxsb52q35-glib-2.56.0-dev/lib --extra-include-dirs=/nix/store/ggdq1si53c6qb0b67lgx145xkndfy4zy-zlib-1.2.11-dev/include --extra-lib-dirs=/nix/store/ggdq1si53c6qb0b67lgx145xkndfy4zy-zlib-1.2.11-dev/lib --extra-lib-dirs=/nix/store/vm7czzwvpwlsd9hkva2y3pr343vbc4zr-zlib-1.2.11/lib --extra-include-dirs=/nix/store/6rbpcw573mmfjnl3r6gyx9c891yvssnv-gettext-0.19.8.1/include --extra-lib-dirs=/nix/store/6rbpcw573mmfjnl3r6gyx9c891yvssnv-gettext-0.19.8.1/lib --extra-include-dirs=/nix/store/6w9snwl61ppkabn5d30bb6bi03sandf8-glibc-iconv-2.27/include --extra-lib-dirs=/nix/store/ycpkd4jxpy913v6fxf4b5mmy9bz81vsy-glib-2.56.0/lib --extra-lib-dirs=/nix/store/iyzhv8i7q8jfp13mb2ii4012zplihf9y-gobject-introspection-1.56.0/lib
Using Parsec parser
Did not find a GI repository for Gdk-3.0 in ["/nix/store/yc8an71h8cah8w6fw0xykjxl68a8j1h7-ghc-8.4.3/share/gir-1.0","/nix/store/3cnh0n698w18l5g933wrx22zvkhcj8ik-ncurses-6.1/share/gir-1.0","/nix/store/yc8an71h8cah8w6fw0xykjxl68a8j1h7-ghc-8.4.3/share/gir-1.0","/nix/store/5pb4a6hv8lc2vfr44ab4mhbljd500csw-pkg-config-0.29.2/share/gir-1.0","/nix/store/9a86wy64xwvq8lhgh5ib46f9gzja9lgi-gobject-introspection-1.56.0-dev/share/gir-1.0","/nix/store/l1v16k68v3njjw281fbfk20zxsb52q35-glib-2.56.0-dev/share/gir-1.0","/nix/store/vm7czzwvpwlsd9hkva2y3pr343vbc4zr-zlib-1.2.11/share/gir-1.0","/nix/store/6rbpcw573mmfjnl3r6gyx9c891yvssnv-gettext-0.19.8.1/share/gir-1.0","/nix/store/ycpkd4jxpy913v6fxf4b5mmy9bz81vsy-glib-2.56.0/share/gir-1.0","/nix/store/iyzhv8i7q8jfp13mb2ii4012zplihf9y-gobject-introspection-1.56.0/share/gir-1.0",
...
Maybe what I should actually do is is send a PR to the gi-vte
package to make sure it says it is also dependent on gtk
?
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.
@jtojnar I'm not super familiar with how cabal2nix
works internally, but I'm wondering if that wouldn't actually solve the problem.
It looks like cabal2nix
correctly figures out that the vte-2.91
library should be pulled in as gnome2.vte
. The problem is that it should actually be gnome3.vte
.
Looking around the cabal2nix
code base, it appears that where I actually want to change is the resolveInNixpkgs
function:
I think I should add a line here with a special case for vte
:
| i == "vte" = binding # (i, path # ["pkgs","gnome3","vte"])
How does this sound?
6071876
to
4161d3b
Compare
I discussed this with the maintainer of gi-vte: He suggested that it is actually incorrect that depending on I went digging to figure out the difference between the In order to get
|
4161d3b
to
0d7b0ca
Compare
Add an override to the vte system library to instead use `gnome3.vte`. This is similar to how gtk and gtksourceview work. This was suggested in NixOS/nixpkgs#44529 (comment).
I just sent a PR to fix cabal2nix: NixOS/cabal2nix#368. |
Here is an update:
|
@jtojnar wrote:
That would be a good solution in principle, but unfortunately that name lookup returns a simple identifier (like |
Here is the updated status:
|
I think it's best to base this PR on the (In case you don't know how to change the base of this PR: press on the "edit" button besides the PR title and use the "base" combobox) |
Thanks for the advice @basvandijk. I've changed this PR to be based on the |
Great. Could you also rename your commit according to CONTRIBUTING.md? Something like:
|
0d7b0ca
to
76943f7
Compare
@basvandijk No problem. I made the recommended change in commit 76943f7. Sorry for not following the recommendation in |
Thank you! |
Add an override to the vte system library to instead use `gnome3.vte`. This is similar to how gtk and gtksourceview work. This was suggested in NixOS/nixpkgs#44529 (comment).
Motivation for this change
The gi-vte Haskell package does not compile in master:
https://hydra.nixos.org/job/nixpkgs/haskell-updates/haskellPackages.gi-vte.x86_64-linux
gi-vte depends on the gi-gtk Haskell package, as well as the VTE system library. The gi-gtk Haskell packge depends on the GTK system library. Currently, gi-gtk is being compiled against the GTK system library from Gnome 3. However, gi-vte is being compiled against the VTE system library from Gnome 2.
This PR does the following three things:
Change the gi-vte package to depend the VTE system library from Gnome 3 in
hackage-packages.nix
.Add a dependency on the GTK system library for gi-vte. I'm not sure exactly why this is necessary, but gi-vte wouldn't build without it.
Remove the gi-vte package from
dont-distribute-packages
inconfiguration-hackage2nix.yaml
.Eventually, I'd like to add a new Haskell package to nixpkgs that depends on gi-vte, so I would like gi-vte to be compiling in master. I'd like to get this in before the 18.09 release.
However, I think the
hackage-packages.nix
file (and maybe even theconfiguration-hackge2nix.yaml
) is being auto-generated, so please let me know if there is some other file I should actually be editing. Also, for my future reference, is there an explanation somewhere of how the Haskell-related nixpkg files work? Like, which files I should edit and send PRs to?Pinging the nixpkgs Haskell maintainers: @peti @ryantm @basvandijk (please let me know if it is not appropriate to do this)
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
(there are currently no packages that depend on gi-vte)./result/bin/
) (there are no binary files produced by gi-vte)nix path-info -S
before and after)