Overlays: Difference between revisions
Fix infinite recursion example |
Adisbladis (talk | contribs) Separate python overlay args from nixpkgs overlay args |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 225: | Line 225: | ||
final: prev: { | final: prev: { | ||
# elements of pkgs.gnome must be taken from gfinal and gprev | # elements of pkgs.gnome must be taken from gfinal and gprev | ||
gnome = prev.gnome.overrideScope | gnome = prev.gnome.overrideScope (gfinal: gprev: { | ||
mutter = gprev.mutter.overrideAttrs (oldAttrs: { | mutter = gprev.mutter.overrideAttrs (oldAttrs: { | ||
patches = oldAttrs.patches ++ [ | patches = oldAttrs.patches ++ [ | ||
Line 295: | Line 295: | ||
final: prev: | final: prev: | ||
# Within the overlay we use a recursive set, though I think we can use `final` as well. | # Within the overlay we use a recursive set, though I think we can use `final` as well. | ||
{ | |||
# nix-shell -p python.pkgs.my_stuff | # nix-shell -p python.pkgs.my_stuff | ||
python = prev.python.override { | python = prev.python.override { | ||
# Careful, we're using a different final and prev here! | # Careful, we're using a different final and prev here! | ||
packageOverrides = | packageOverrides = pyfinal: pyprev: { | ||
my_stuff = | my_stuff = pyprev.buildPythonPackage rec { | ||
pname = "pyaes"; | pname = "pyaes"; | ||
version = "1.6.0"; | version = "1.6.0"; | ||
src = | src = pyprev.fetchPypi { | ||
inherit pname version; | inherit pname version; | ||
hash = "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"; | hash = "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"; | ||
Line 311: | Line 311: | ||
}; | }; | ||
# nix-shell -p pythonPackages.my_stuff | # nix-shell -p pythonPackages.my_stuff | ||
pythonPackages = python.pkgs; | pythonPackages = final.python.pkgs; | ||
# nix-shell -p my_stuff | # nix-shell -p my_stuff | ||
my_stuff = pythonPackages.buildPythonPackage rec { | my_stuff = final.pythonPackages.buildPythonPackage rec { | ||
pname = "pyaes"; | pname = "pyaes"; | ||
version = "1.6.0"; | version = "1.6.0"; |