Reputation: 703
I need to modify configureFlags
of pcre
package from <nixpkgs>
.
I've tried to do it with .nixpkgs/config.nix file as described here:
{
packageOverrides = pkgs: rec {
pcre = pkgs.pcre.overrideDerivation (attrs: {
configureFlags = [
"--disable-jit"
"--enable-unicode-properties"
"--disable-cpp"
];
doCheck = "";
});
};
}
But it doesn't work. When I run nix-build -p pcre
it builds the package twice: with --disable-jit and with --enable-jit. When I run nix-build -p stdenv
customizations in config.nix are ignored.
Upvotes: 2
Views: 1335
Reputation: 3643
stdenv
is special in that it is used to build "normal" packages (and you are overriding pcre
as "normal" package). So, to make customizations work, you have to patch stdenv
!
For example, you can use one of the functions from adapters.
If you want to embed pcre
more deeply, you have to look into staged stdenv
building
Upvotes: 2