Reputation: 598
I want to add a makeFlag to the Firefox package using Nixpkgs overlays, but it seems to be non-trivial.
(import <nixpkgs> {
overlays = [
(self: super: {
w3m = super.w3m.overrideAttrs (oldAttrs: {
# that makeFlag makes no sense for w3m, it's just for demonstration
makeFlags = oldAttrs.makeFlags ++ [ "BUILD_OFFICIAL=1" ];
});
})
];
}).w3m
(import <nixpkgs> {
overlays = [
(self: super: {
firefox = super.firefox.overrideAttrs (oldAttrs: {
makeFlags = oldAttrs.makeFlags ++ [ "BUILD_OFFICIAL=1" ];
});
})
];
}).firefox
$ nix build -f default.nix
error: attribute 'makeFlags' missing, at /path/to/default.nix:5:21
(use '--show-trace' to show detailed location information)
Upvotes: 2
Views: 721
Reputation: 598
It turned out, that one needs to override the firefox-unwrapped
attribute:
(import <nixpkgs> {
overlays = [
(self: super: {
firefox-unwrapped = super.firefox-unwrapped.overrideAttrs (oldAttrs: {
makeFlags = oldAttrs.makeFlags ++ [ "BUILD_OFFICIAL=1" ];
});
})
];
}).firefox-unwrapped
That way the expression evaluates.
Upvotes: 3