>>101185514
>I think that's essentially what this is doing unless I'm mistaken.
No, it's different. It'll still work, but it's not the same thing.
Let me give a pseudo-code example. Say in Nix the standard vscode package is an object defined like:
vscode = package {
name = "vscode"
version = 1.0.0
build-phases = {
configure-phase = ....
build-phase = ....
}
}
Now what I'm claiming is the "right way" to do this, is that you define a new object like:
my_vscode = package {
inherit vscode # now your package contains all the same stuff as above, you don't need to re-write it, but you can modify those values
build-phases = vscode.build-phases + MY_NEW_BUILD_PHASE { function_to_modify_the_file_you_want_to_modify() }
}
And then you would just install my_vscode instead of vscode.
What you're describing is something different. It would be like a package that contains vscode as a dependency and then copies its files and modifies them, instead of actually modifying the vscode package object itself.