NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.38k stars 13.6k forks source link

arc-theme depends on gnome-shell #65779

Closed ashkitten closed 5 years ago

ashkitten commented 5 years ago

from the readme of arc-theme, it only optionally depends on gnome-shell and gtk for auto-detecting versions. if needed, we can supply the version strings without having to build the packages themselves.

seems a bit heavy-handed to build all of gnome-shell and its dependencies just to build a gtk theme when many users won't even be using gnome-shell.

worldofpeace commented 5 years ago

Note the impact is only the build time closure because it's native.

Since it only needs these types of packages for version string detection we should be able to pass the values with the flags it provides.

--with-gnome-shell=<version>   build the gnome-shell theme for a specific version
--with-gtk3=<version>          build the GTK3 theme for a specific version

Note: Normally the correct version is detected automatically
and these options should not be needed.

That should be easy because we can access gtk3.version, etc. attributes. However we'd need to check how the value is expected to be formatted.

ashkitten commented 5 years ago

looks like it wants it formatted like 3.32.2 and then strips the last number in this

worldofpeace commented 5 years ago

looks like it wants it formatted like 3.32.2 and then strips the last number in this

Good, then we probably don't have to do anything extra.

romildo commented 5 years ago

Fixed by PR https://github.com/NixOS/nixpkgs/pull/68662

worldofpeace commented 5 years ago

Hmm, this actually didn't circumvent the issue of depending on gnome-shell at build-time.

You'd have to never touch the gnome-shell attribute, though I really don't think it's necessary.

romildo commented 5 years ago

As far as I understand, gnome-shell does not have to be built in order to build arc-theme now because it is not listed in any build input attribute. It just uses the gnome-shell version attribute, which is available immediately in nixpkgs, without having to build gnome-shell.

I have understood that the problem was having to build gnome-shell in order to build arc-theme, and this has been fixed. @worldofpeace isn't it the case?

Edit: Now gnome-shell does not have any impact at the build time closure, right?

I have no other idea on how to build arc-theme without telling its installer what is the desired version of gnome-shell.

worldofpeace commented 5 years ago

Ah right, you don't need it because it's just the version attribute which doesn't require you to build it. My misunderstading @romildo of something that I guess I realized already :rofl: (https://github.com/NixOS/nixpkgs/issues/65779#issuecomment-517653869)