I wrote a patch for perlPackages.CryptDES as the recent GCC 14 migration set off some warnings and wanted to make an overlay for my global install and add it to the GitHub issue.
Now the package builds locally if I cd
into my Nixpkgs clone and nix-build -A perlPackages.CryptDES
, which is good right? So, I thought I could just add something like this to my overlays (taken from the Overriding a package inside a scope):
# in configuration.nix
(final: prev: {
# until #369877 gets merged: https://nixpk.gs/pr-tracker.html?pr=369877
perlPackages = prev.perlPackages.overrideScope (
pfinal: pprev: {
CryptDES = pprev.CryptDES.overrideAttrs {
patches = [
(prev.fetchpatch {
url = "https://raw.githubusercontent.com/poopsicles/nixpkgs/c52284ef8a251e997228eb237db1b091fd205250/pkgs/development/perl-modules/CryptDES-gcc14.patch";
hash = "";
})
];
};
}
);
})
(I don’t know the hash yet, so waiting for it to fail and tell me)
I nixos-rebuild switch
, try to get it to run with nix-shell -p perlPackages.CryptDES
, but the patchPhase doesn’t run so the error still occurs. I can see in the wiki that pythonPackages
and rPackages
have a special override function, but perlPackages
doesn’t seem to have that:
$ nix repl
nix-repl> :l <nixpkgs>
Added 23428 variables.
nix-repl> rPackages.override.__functionArgs
{
R = false;
overrides = false;
pkgs = false;
}
nix-repl> perlPackages.override.__functionArgs
{
callPackage = false;
makeScopeWithSplicing' = false;
perl = false;
pkgs = false;
stdenv = false;
}
Am I going about all this the wrong way?