我想使用 Nixpkgs 覆盖将 makeFlag 添加到 Firefox 包中,但这似乎很重要。
覆盖 w3m 工作...
(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
...但覆盖 Firefox 不会。
(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)