You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to b5cd694, which added
the attribute to mkNodeModule and buildNpmPackage but didn't do it for
the buildYarnPackage flavour.
However, we're using lib.extends instead of a plain attribute set, since
we want to tread the original package set as a fixed point to be
compasable with multiple levels of overrides, similar to how it's done
with nixpkgs overlays.
In my case it's to quickly override a dependency fetched from GitHub,
eg. like this:
let
mydep = "https://github.com/someowner/somerepo.git";
newMydep = pkgs.fetchFromGitHub {
owner = "someowner";
repo = "somerepo";
rev = "...";
sha256 = "...";
fetchSubmodules = true;
leaveDotGit = true;
};
in buildYarnPackage {
# ...
nativeBuildInputs = lib.singleton (pkgs.writeScriptBin "git" ''
#!${pkgs.python3.interpreter}
import sys, os
for n, arg in enumerate(sys.argv):
if arg == '${mydep}':
sys.argv[n] = '${newMydep}'
os.execv('${pkgs.git}/bin/git', sys.argv)
'');
packageOverrides = lib.singleton (self: super: {
${mydep} = super.${mydep} // { path = "dummy"; };
});
# ...
}
I know that the way I've done the above is probably winning the first
price for "the ugliest override" but since I'm not particularly invested
in anything related to node.js, I'm usually pretty cruel when it comes
to it.
So the above example is just to have a complete almost-real-world
example for reference and in this case it's to work around serokell#7.
Signed-off-by: aszlig <aszlig@nix.build>
Example: current vault ui.
The lockfile has blocks like
This is the git hash, not the sha1. Our mkyarnjson returns
AssertionError [ERR_ASSERTION]: missing integrity
with it. This is why the CI fails.The text was updated successfully, but these errors were encountered: