···444 pnpmDeps = pnpm.fetchDeps {
445 inherit (finalAttrs) pname version src;
446 hash = "...";
0447 };
448})
449```
···558559In this example, `prePnpmInstall` will be run by both `pnpm.configHook` and by the `pnpm.fetchDeps` builder.
56000000000000000000000000000000000000561562### Yarn {#javascript-yarn}
563
···444 pnpmDeps = pnpm.fetchDeps {
445 inherit (finalAttrs) pname version src;
446 hash = "...";
447+ fetcherVersion = 2;
448 };
449})
450```
···559560In this example, `prePnpmInstall` will be run by both `pnpm.configHook` and by the `pnpm.fetchDeps` builder.
561562+#### PNPM `fetcherVersion` {#javascript-pnpm-fetcherVersion}
563+564+This is the version of the output of `pnpm.fetchDeps`, if you haven't set it already, you can use `1` with your current hash:
565+566+```nix
567+{
568+ # ...
569+ pnpmDeps = pnpm.fetchDeps {
570+ # ...
571+ hash = "..."; # you can use your already set hash here
572+ fetcherVersion = 1;
573+ };
574+}
575+```
576+577+After upgrading to a newer `fetcherVersion`, you need to regenerate the hash:
578+579+```nix
580+{
581+ # ...
582+ pnpmDeps = pnpm.fetchDeps {
583+ # ...
584+ hash = "..."; # clear this hash and generate a new one
585+ fetcherVersion = 2;
586+ };
587+}
588+```
589+590+This variable ensures that we can make changes to the output of `pnpm.fetchDeps` without breaking existing hashes.
591+Changes can include workarounds or bug fixes to existing PNPM issues.
592+593+##### Version history {#javascript-pnpm-fetcherVersion-versionHistory}
594+595+- 1: Initial version, nothing special
596+- 2: [Ensure consistent permissions](https://github.com/NixOS/nixpkgs/pull/422975)
597598### Yarn {#javascript-yarn}
599
···95 environment = mapAttrs (_: v: if isBool v then boolToString' v else toString v) cfg.settings;
96 serviceConfig =
97 {
0000000000000000000000000000000000000000098 ExecStart = [
99 ""
100 "${lib.getExe cfg.package} ${args}"
···111 # A private user cannot have process capabilities on the host's user
112 # namespace and thus CAP_NET_BIND_SERVICE has no effect.
113 PrivateUsers = true;
0114 }
115 );
116 };
···45 "systemd-oomd.service"
46 "systemd-oomd.socket"
47 ];
48+ # TODO: Added upstream in upcoming systemd release. Good to drop once we use v258 or later
49+ systemd.services.systemd-oomd.after = [ "systemd-sysusers.service" ];
50 systemd.services.systemd-oomd.wantedBy = [ "multi-user.target" ];
5152 environment.etc."systemd/oomd.conf".text = lib.generators.toINI { } {
···41 version
42 ;
43 hash = "sha256-SdqeTYRH60CyU522+nBo0uCDnzxDP48eWBAtGTL/pqg=";
044 };
4546 # Patches to get submodule sha from file instead of 'git submodule status'
···41 version
42 ;
43 hash = "sha256-SdqeTYRH60CyU522+nBo0uCDnzxDP48eWBAtGTL/pqg=";
44+ fetcherVersion = 1;
45 };
4647 # Patches to get submodule sha from file instead of 'git submodule status'
···21 requests,
22}:
23let
24- version = "1.4.4";
2526 src = fetchFromGitHub {
27 owner = "RapidAI";
28 repo = "RapidOCR";
29 tag = "v${version}";
30- hash = "sha256-x0VELDKOffxbV3v0aDFJFuDC4YfsGM548XWgINmRc3M=";
31 };
3233 models =
···101102 pythonImportsCheck = [ "rapidocr_onnxruntime" ];
103104- nativeCheckInputs = [
105- pytestCheckHook
106- requests
107- ];
108-109- # These are tests for different backends.
110- disabledTestPaths = [
111- "tests/test_vino.py"
112- "tests/test_paddle.py"
113- ];
114-115- disabledTests = [
116- # Needs Internet access
117- "test_long_img"
118- ];
119120 meta = {
121 # This seems to be related to https://github.com/microsoft/onnxruntime/issues/10038
···21 requests,
22}:
23let
24+ version = "2.1.0";
2526 src = fetchFromGitHub {
27 owner = "RapidAI";
28 repo = "RapidOCR";
29 tag = "v${version}";
30+ hash = "sha256-4R2rOCfnhElII0+a5hnvbn+kKQLEtH1jBvfFdxpLEBk=";
31 };
3233 models =
···101102 pythonImportsCheck = [ "rapidocr_onnxruntime" ];
103104+ # As of version 2.1.0, 61 out of 70 tests require internet access.
105+ # It's just not plausible to manually pick out ones that actually work
106+ # in a hermetic build environment anymore :(
107+ doCheck = false;
00000000000108109 meta = {
110 # This seems to be related to https://github.com/microsoft/onnxruntime/issues/10038