3 ms·
It wasn’t apparent to me from the docs (back then?) how to use the custom libpng only with a specific package. Do you have a pointer to the documentation on tha
by secure 8y ago
It wasn’t apparent to me from the docs (back then?) how to use the custom libpng only with a specific package. Do you have a pointer to the documentation on that please?
- Ralith 8y agoYou just pass it in explicitly: https://nixos.org/nixpkgs/manual/#sec-pkg-override https://nixos.org/nixpkgs/manual/#sec-pkg-override
- mbrock 8y agohttps://nixos.org/nixpkgs/manual/#sec-pkg-override https://nixos.org/nixpkgs/manual/#sec-pkg-override https://nixos.org/nixos/nix-pills/override-design-pattern.html https://nixos.org/nixos/nix-pills/override-design-pattern.ht... https://nixos.org/nixos/nix-pills/nixpkgs-overriding-packages.html https://nixos.org/nixos/nix-pills/nixpkgs-overriding-package... Those are the documentation pages I found right now... It's basically two steps: constructing the patched libpng derivation, and then overriding the libpng derivation in the specific program. The first step would be something like let myLibpng = pkgs.libpng.overrideAttrs (old: { patches = old.patches ++ [~/libpng.patch]; }); and the second step would be something like let myProgram = pkgs.program.override { libpng = myLibpng; }; and then you could include "myProgram" in your system package list. If you have an "overlay" set up in your system then you could also do this as part of that overlay.