From bf391055408fc05327bc020b74296795829ea8c6 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 29 Dec 2024 16:51:48 +0100 Subject: [PATCH] ride: bump nan version to fix build with nodejs_22 --- pkgs/by-name/ri/ride/package.nix | 5 ++++- pkgs/by-name/ri/ride/update-nan.patch | 31 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/ri/ride/update-nan.patch diff --git a/pkgs/by-name/ri/ride/package.nix b/pkgs/by-name/ri/ride/package.nix index f8e6746c925cc6..848edd6ea1359a 100644 --- a/pkgs/by-name/ri/ride/package.nix +++ b/pkgs/by-name/ri/ride/package.nix @@ -26,7 +26,7 @@ buildNpmPackage rec { hash = "sha256-xR+HVC1JVrPkgPhIJZxdTVG52+QbanmD1c/uO5l84oc="; }; - npmDepsHash = "sha256-h+48/9h7/cD8woyA0UCLtzKuE9jCrfpDk6IeoDWnYik="; + npmDepsHash = "sha256-C8puCz/w5xkaR4QVXXOdoO8n4gNZrRWMcB9/f1DcuMc="; patches = [ # Adds support for electron versions >=28 @@ -40,6 +40,9 @@ buildNpmPackage rec { (replaceVars ./mk.patch { inherit version; }) + + # would not build with nodejs_22 and above without this + ./update-nan.patch ]; postPatch = '' diff --git a/pkgs/by-name/ri/ride/update-nan.patch b/pkgs/by-name/ri/ride/update-nan.patch new file mode 100644 index 00000000000000..64f835915f3e31 --- /dev/null +++ b/pkgs/by-name/ri/ride/update-nan.patch @@ -0,0 +1,31 @@ +diff --git a/package-lock.json b/package-lock.json +index a0bd285..5a5ec59 100644 +--- a/package-lock.json ++++ b/package-lock.json +@@ -8034,9 +8034,10 @@ + "dev": true + }, + "node_modules/nan": { +- "version": "2.17.0", +- "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", +- "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", ++ "version": "2.22.0", ++ "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", ++ "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", ++ "license": "MIT", + "optional": true + }, + "node_modules/nanomatch": { +@@ -18258,9 +18259,9 @@ + "dev": true + }, + "nan": { +- "version": "2.17.0", +- "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", +- "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", ++ "version": "2.22.0", ++ "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", ++ "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", + "optional": true + }, + "nanomatch": {