Overlays: Difference between revisions

imported>Symphorien
add an example of overlay to override a version
imported>Symphorien
example of adding a patch via overlay
Line 122: Line 122:
}
}


</syntaxhighlight>
=== Adding patches ===
It is easy to add patches to a nix package:
<syntaxhighlight lang="nix">
self: super:
{
  sl = super.sl.overrideAttrs (old: {
    patches = (old.patches or []) ++ [
      (super.fetchpatch {
        url = "https://github.com/charlieLehman/sl/commit/e20abbd7e1ee26af53f34451a8f7ad79b27a4c0a.patch";
        sha256 = "07sx98d422589gxr8wflfpkdd0k44kbagxl3b51i56ky2wfix7rc";
      })
      # alternatively if you have a local patch,
      /path/to/file.patch
      # or a relative path (relative to the current nix file)
      ./relative.patch
    ];
  });
}
</syntaxhighlight>
</syntaxhighlight>
=== Python Packages Overlay ===
=== Python Packages Overlay ===