[Nix-dev] Overriding xorgserver in nixpkgs

Vladimír Čunát vcunat at gmail.com
Tue Jan 12 08:43:28 CET 2016


On 01/12/2016 04:18 AM, T White wrote:
> the AMD driver is the only one which does not support it.

Yeah, probably. I wasn't so certain of the legacy nvidia branches, but
Linux support of nvidia still seems far ahead of AMD:
https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-Legacy-X-1.18

> I am perfectly happy doing a rebuild of lots of packages if it means
> the driver runs for me in the interim.

Changing xorg-server causes almost no rebuilds (mainly just X drivers).

> Do you have any 
> suggestions on how I could patch the declaration of the xorg package 
> (all-packages.nix) to swap between the two either conditionally 
> depending upon whether services.xserver.videoDrivers contains [ 
> "ati_unfree" ] or using a config switch in configuration.nix?

Actually, this sounds a good idea for a solution in the official nixpkgs
if the incompatibilities should last over a long term.

> I wanted to avoid packageOverrides because it is expensive and also
> does not work as expected when applied to the xorg package.

It's expensive but note that you do need an expensive thing - all
packages that (transitively) depend on xorg-server need to have that
dependency changed to your chosen version (and recompiled).

Overriding nested sets such as `xorg` is more complex. Explained
examples for the similar Haskell case is on:
http://nixos.org/nixpkgs/manual/#how-to-override-package-versions-in-a-compiler-specific-package-set

--Vladimir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3771 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160112/786a295c/attachment.bin 


More information about the nix-dev mailing list