From 7cf192db876817a9bc47cb10245805bd7781d14a Mon Sep 17 00:00:00 2001 From: geodic Date: Thu, 26 Dec 2024 08:26:20 -0500 Subject: [PATCH] tabby-terminal: bumped electron & fixed suggestions --- .../ta/tabby-terminal/fix-app-version.patch | 13 - .../fix-argv-prefix-splice.patch | 13 - .../fix-deps-for-new-electron.patch | 434 ++++++++++++++++++ pkgs/by-name/ta/tabby-terminal/package.nix | 74 +-- .../ta/tabby-terminal/splice-argv.patch | 17 + 5 files changed, 494 insertions(+), 57 deletions(-) delete mode 100644 pkgs/by-name/ta/tabby-terminal/fix-app-version.patch delete mode 100644 pkgs/by-name/ta/tabby-terminal/fix-argv-prefix-splice.patch create mode 100644 pkgs/by-name/ta/tabby-terminal/fix-deps-for-new-electron.patch create mode 100644 pkgs/by-name/ta/tabby-terminal/splice-argv.patch diff --git a/pkgs/by-name/ta/tabby-terminal/fix-app-version.patch b/pkgs/by-name/ta/tabby-terminal/fix-app-version.patch deleted file mode 100644 index 8f9166763a634..0000000000000 --- a/pkgs/by-name/ta/tabby-terminal/fix-app-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/app/package.json b/app/package.json -index bba15673..9170d1c8 100644 ---- a/app/package.json -+++ b/app/package.json -@@ -8,7 +8,7 @@ - "email": "e@ajenti.org" - }, - "main": "dist/main.js", -- "version": "1.0.0-alpha.1", -+ "version": "1.0.215", - "scripts": { - "postinstall": "patch-package", - "build": "webpack --progress --color --display-modules", diff --git a/pkgs/by-name/ta/tabby-terminal/fix-argv-prefix-splice.patch b/pkgs/by-name/ta/tabby-terminal/fix-argv-prefix-splice.patch deleted file mode 100644 index ade311d16739c..0000000000000 --- a/pkgs/by-name/ta/tabby-terminal/fix-argv-prefix-splice.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/app/lib/cli.ts b/app/lib/cli.ts -index 03213dd8..b4b9df78 100644 ---- a/app/lib/cli.ts -+++ b/app/lib/cli.ts -@@ -1,7 +1,7 @@ - import { app } from 'electron' - - export function parseArgs (argv: string[], cwd: string): any { -- if (argv[0].includes('node')) { -+ if (argv[0].includes('electron')) { - argv = argv.slice(1) - } - diff --git a/pkgs/by-name/ta/tabby-terminal/fix-deps-for-new-electron.patch b/pkgs/by-name/ta/tabby-terminal/fix-deps-for-new-electron.patch new file mode 100644 index 0000000000000..4454369488f96 --- /dev/null +++ b/pkgs/by-name/ta/tabby-terminal/fix-deps-for-new-electron.patch @@ -0,0 +1,434 @@ +diff --git a/app/package.json b/app/package.json +index bda23d3d..da8b4169 100644 +--- a/app/package.json ++++ b/app/package.json +@@ -64,6 +64,7 @@ + }, + "resolutions": { + "*/node-abi": "^3", +- "node-gyp": "^10.0.0" ++ "node-gyp": "^10.0.0", ++ "nan": "2.22.0" + } + } +diff --git a/app/yarn.lock b/app/yarn.lock +index 1aa949c3..b7b61f67 100644 +--- a/app/yarn.lock ++++ b/app/yarn.lock +@@ -2577,10 +2577,10 @@ mz@^2.7.0: + object-assign "^4.0.1" + thenify-all "^1.0.0" + +-nan@^2.17.0: +- version "2.20.0" +- resolved "https://registry.yarnpkg.com/nan/-/nan-2.20.0.tgz#08c5ea813dd54ed16e5bd6505bf42af4f7838ca3" +- integrity sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw== ++nan@2.22.0, nan@^2.17.0: ++ version "2.22.0" ++ resolved "https://registry.yarnpkg.com/nan/-/nan-2.22.0.tgz#31bc433fc33213c97bad36404bb68063de604de3" ++ integrity sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw== + + napi-build-utils@^1.0.1: + version "1.0.2" +@@ -3909,8 +3909,7 @@ strict-uri-encode@^2.0.0: + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + +-"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +- name string-width-cjs ++"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== +@@ -3945,6 +3944,15 @@ string-width@^3.0.0, string-width@^3.1.0: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + ++string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: ++ version "4.2.3" ++ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" ++ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== ++ dependencies: ++ emoji-regex "^8.0.0" ++ is-fullwidth-code-point "^3.0.0" ++ strip-ansi "^6.0.1" ++ + string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" +@@ -3987,8 +3995,7 @@ stringify-package@^1.0.0, stringify-package@^1.0.1: + resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" + integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== + +-"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.1: +- name strip-ansi-cjs ++"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== +@@ -4023,6 +4030,13 @@ strip-ansi@^6.0.0: + dependencies: + ansi-regex "^5.0.0" + ++strip-ansi@^6.0.1: ++ version "6.0.1" ++ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" ++ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== ++ dependencies: ++ ansi-regex "^5.0.1" ++ + strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" +@@ -4434,8 +4448,7 @@ worker-farm@^1.6.0, worker-farm@^1.7.0: + dependencies: + errno "~0.1.7" + +-"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +- name wrap-ansi-cjs ++"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== +@@ -4461,6 +4474,15 @@ wrap-ansi@^5.1.0: + string-width "^3.0.0" + strip-ansi "^5.0.0" + ++wrap-ansi@^7.0.0: ++ version "7.0.0" ++ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" ++ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== ++ dependencies: ++ ansi-styles "^4.0.0" ++ string-width "^4.1.0" ++ strip-ansi "^6.0.0" ++ + wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" +diff --git a/package.json b/package.json +index eaef6e3e..94d97965 100644 +--- a/package.json ++++ b/package.json +@@ -39,11 +39,11 @@ + "cross-env": "7.0.3", + "css-loader": "^6.7.3", + "deep-equal": "2.0.5", +- "electron": "^29", ++ "electron": "^32.2.7", + "electron-builder": "^24.6.4", + "electron-download": "^4.1.1", + "electron-installer-snap": "^5.1.0", +- "electron-rebuild": "^3.2.9", ++ "@electron/rebuild": "^3.7.1", + "eslint": "^8.48.0", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", +@@ -55,7 +55,7 @@ + "lru-cache": "^6.0.0", + "macos-release": "^3.3.0", + "ngx-toastr": "^16.0.2", +- "node-abi": "^3.65.0", ++ "node-abi": "^3.71.0", + "npmlog": "6.0.2", + "npx": "^10.2.2", + "patch-package": "^6.4.7", +@@ -97,7 +97,7 @@ + "*/pug": "^3", + "lzma-native": "^8.0.6", + "**/graceful-fs": "^4.2.4", +- "nan": "2.17.0" ++ "nan": "2.22.0" + }, + "scripts": { + "build": "npm run build:typings && node scripts/build-modules.mjs", +diff --git a/yarn.lock b/yarn.lock +index 3d00402e..c6906fd3 100644 +--- a/yarn.lock ++++ b/yarn.lock +@@ -346,6 +346,21 @@ + optionalDependencies: + global-agent "^3.0.0" + ++"@electron/node-gyp@https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2": ++ version "10.2.0-electron.1" ++ resolved "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2" ++ dependencies: ++ env-paths "^2.2.0" ++ exponential-backoff "^3.1.1" ++ glob "^8.1.0" ++ graceful-fs "^4.2.6" ++ make-fetch-happen "^10.2.1" ++ nopt "^6.0.0" ++ proc-log "^2.0.1" ++ semver "^7.3.5" ++ tar "^6.2.1" ++ which "^2.0.2" ++ + "@electron/notarize@2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3" +@@ -375,6 +390,26 @@ + minimist "^1.2.6" + plist "^3.0.5" + ++"@electron/rebuild@^3.7.1": ++ version "3.7.1" ++ resolved "https://registry.yarnpkg.com/@electron/rebuild/-/rebuild-3.7.1.tgz#27ed124f7f1dbed92b222aabe68c0e4a3e6c5cea" ++ integrity sha512-sKGD+xav4Gh25+LcLY0rjIwcCFTw+f/HU1pB48UVbwxXXRGaXEqIH0AaYKN46dgd/7+6kuiDXzoyAEvx1zCsdw== ++ dependencies: ++ "@electron/node-gyp" "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2" ++ "@malept/cross-spawn-promise" "^2.0.0" ++ chalk "^4.0.0" ++ debug "^4.1.1" ++ detect-libc "^2.0.1" ++ fs-extra "^10.0.0" ++ got "^11.7.0" ++ node-abi "^3.45.0" ++ node-api-version "^0.2.0" ++ ora "^5.1.0" ++ read-binary-file-arch "^1.0.6" ++ semver "^7.3.5" ++ tar "^6.0.5" ++ yargs "^17.0.1" ++ + "@electron/universal@1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.4.1.tgz#3fbda2a5ed9ff9f3304c8e8316b94c1e3a7b3785" +@@ -1166,7 +1201,7 @@ abab@^2.0.6: + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +-abbrev@1: ++abbrev@1, abbrev@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +@@ -3048,35 +3083,15 @@ electron-publish@24.5.0: + lazy-val "^1.0.5" + mime "^2.5.2" + +-electron-rebuild@^3.2.9: +- version "3.2.9" +- resolved "https://registry.yarnpkg.com/electron-rebuild/-/electron-rebuild-3.2.9.tgz#ea372be15f591f8d6d978ee9bca6526dadbcf20f" +- integrity sha512-FkEZNFViUem3P0RLYbZkUjC8LUFIK+wKq09GHoOITSJjfDAVQv964hwaNseTTWt58sITQX3/5fHNYcTefqaCWw== +- dependencies: +- "@malept/cross-spawn-promise" "^2.0.0" +- chalk "^4.0.0" +- debug "^4.1.1" +- detect-libc "^2.0.1" +- fs-extra "^10.0.0" +- got "^11.7.0" +- lzma-native "^8.0.5" +- node-abi "^3.0.0" +- node-api-version "^0.1.4" +- node-gyp "^9.0.0" +- ora "^5.1.0" +- semver "^7.3.5" +- tar "^6.0.5" +- yargs "^17.0.1" +- + electron-to-chromium@^1.4.284: + version "1.4.286" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.286.tgz#0e039de59135f44ab9a8ec9025e53a9135eba11f" + integrity sha512-Vp3CVhmYpgf4iXNKAucoQUDcCrBQX3XLBtwgFqP9BUXuucgvAV9zWp1kYU7LL9j4++s9O+12cb3wMtN4SJy6UQ== + +-electron@^29: +- version "29.4.5" +- resolved "https://registry.yarnpkg.com/electron/-/electron-29.4.5.tgz#b83bbeee6fc722dbbaab30d3a6bc8e982c9ab98d" +- integrity sha512-DlEuzGbWBYl1Qr0qUYgNZdoixJg4YGHy2HC6fkRjSXSlb01UrQ5ORi8hNLzelzyYx8rNQyyE3zDUuk9EnZwYuA== ++electron@^32.2.7: ++ version "32.2.7" ++ resolved "https://registry.yarnpkg.com/electron/-/electron-32.2.7.tgz#4eaf78534c99ba060da5bb002c737206be33f225" ++ integrity sha512-y8jbQRG3xogF70XPlk5c+dWe5iRfUBo28o2NMpKd/CcW7ENIaWtBlGima8/8nmRdAaYTy1+yIt6KB0Lon9H8cA== + dependencies: + "@electron/get" "^2.0.0" + "@types/node" "^20.9.0" +@@ -3591,6 +3606,11 @@ execa@^1.0.0: + signal-exit "^3.0.0" + strip-eof "^1.0.0" + ++exponential-backoff@^3.1.1: ++ version "3.1.1" ++ resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" ++ integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== ++ + extend@~3.0.0, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" +@@ -4150,7 +4170,7 @@ glob-to-regexp@^0.4.1: + once "^1.3.0" + path-is-absolute "^1.0.0" + +-glob@8.1.0, glob@^8.0.1, glob@^8.0.3: ++glob@8.1.0, glob@^8.0.1, glob@^8.0.3, glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== +@@ -5614,7 +5634,7 @@ lunr@^2.3.9: + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +-lzma-native@^8.0.5, lzma-native@^8.0.6: ++lzma-native@^8.0.6: + version "8.0.6" + resolved "https://registry.yarnpkg.com/lzma-native/-/lzma-native-8.0.6.tgz#3ea456209d643bafd9b5d911781bdf0b396b2665" + integrity sha512-09xfg67mkL2Lz20PrrDeNYZxzeW7ADtpYFbwSQh9U8+76RIzx5QsJBMy8qikv3hbUPfpy6hqwxt6FcGK81g9AA== +@@ -5649,7 +5669,7 @@ make-dir@^3.0.2: + dependencies: + semver "^6.0.0" + +-make-fetch-happen@^10.0.3: ++make-fetch-happen@^10.2.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" + integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== +@@ -5985,10 +6005,10 @@ mute-stream@~0.0.4: + resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +-nan@2.17.0, nan@^2.18.0, nan@^2.19.0: +- version "2.17.0" +- resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" +- integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== ++nan@2.22.0, nan@^2.18.0, nan@^2.19.0: ++ version "2.22.0" ++ resolved "https://registry.yarnpkg.com/nan/-/nan-2.22.0.tgz#31bc433fc33213c97bad36404bb68063de604de3" ++ integrity sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw== + + nanoid@^3.3.4: + version "3.3.4" +@@ -6030,10 +6050,10 @@ no-case@^3.0.4: + lower-case "^2.0.2" + tslib "^2.0.3" + +-node-abi@^3.0.0, node-abi@^3.65.0: +- version "3.65.0" +- resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.65.0.tgz#ca92d559388e1e9cab1680a18c1a18757cdac9d3" +- integrity sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA== ++node-abi@^3.45.0, node-abi@^3.71.0: ++ version "3.71.0" ++ resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.71.0.tgz#52d84bbcd8575efb71468fbaa1f9a49b2c242038" ++ integrity sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw== + dependencies: + semver "^7.3.5" + +@@ -6047,10 +6067,10 @@ node-addon-api@^3.1.0: + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" + integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== + +-node-api-version@^0.1.4: +- version "0.1.4" +- resolved "https://registry.yarnpkg.com/node-api-version/-/node-api-version-0.1.4.tgz#1ed46a485e462d55d66b5aa1fe2821720dedf080" +- integrity sha512-KGXihXdUChwJAOHO53bv9/vXcLmdUsZ6jIptbvYvkpKfth+r7jw44JkVxQFA3kX5nQjzjmGu1uAu/xNNLNlI5g== ++node-api-version@^0.2.0: ++ version "0.2.0" ++ resolved "https://registry.yarnpkg.com/node-api-version/-/node-api-version-0.2.0.tgz#5177441da2b1046a4d4547ab9e0972eed7b1ac1d" ++ integrity sha512-fthTTsi8CxaBXMaBAD7ST2uylwvsnYxh2PfaScwpMhos6KlSFajXQPcM4ogNE1q2s3Lbz9GCGqeIHC+C6OZnKg== + dependencies: + semver "^7.3.5" + +@@ -6075,22 +6095,6 @@ node-gyp-build@^4.2.1: + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +-node-gyp@^9.0.0: +- version "9.1.0" +- resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.1.0.tgz#c8d8e590678ea1f7b8097511dedf41fc126648f8" +- integrity sha512-HkmN0ZpQJU7FLbJauJTHkHlSVAXlNGDAzH/VYFZGDOnFyn/Na3GlNJfkudmufOdS6/jNFhy88ObzL7ERz9es1g== +- dependencies: +- env-paths "^2.2.0" +- glob "^7.1.4" +- graceful-fs "^4.2.6" +- make-fetch-happen "^10.0.3" +- nopt "^5.0.0" +- npmlog "^6.0.0" +- rimraf "^3.0.2" +- semver "^7.3.5" +- tar "^6.1.2" +- which "^2.0.2" +- + node-gyp@~3.6.2: + version "3.6.3" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.3.tgz#369fcb09146ae2167f25d8d23d8b49cc1a110d8d" +@@ -6122,12 +6126,12 @@ node-releases@^2.0.8: + dependencies: + abbrev "1" + +-nopt@^5.0.0: +- version "5.0.0" +- resolved "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" +- integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== ++nopt@^6.0.0: ++ version "6.0.0" ++ resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" ++ integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== + dependencies: +- abbrev "1" ++ abbrev "^1.0.0" + + nopt@~4.0.1: + version "4.0.3" +@@ -6351,7 +6355,7 @@ npm@5.1.0: + gauge "~2.7.3" + set-blocking "~2.0.0" + +-npmlog@6.0.2, npmlog@^6.0.0: ++npmlog@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" + integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== +@@ -7011,6 +7015,11 @@ pretty-bytes@^1.0.2: + get-stdin "^4.0.1" + meow "^3.1.0" + ++proc-log@^2.0.1: ++ version "2.0.1" ++ resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-2.0.1.tgz#8f3f69a1f608de27878f91f5c688b225391cb685" ++ integrity sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw== ++ + process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" +@@ -7371,6 +7380,13 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.1: + minimist "^1.2.0" + strip-json-comments "~2.0.1" + ++read-binary-file-arch@^1.0.6: ++ version "1.0.6" ++ resolved "https://registry.yarnpkg.com/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz#959c4637daa932280a9b911b1a6766a7e44288fc" ++ integrity sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg== ++ dependencies: ++ debug "^4.3.4" ++ + read-cmd-shim@~1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz" +@@ -8530,7 +8546,7 @@ tar@^2.0.0, tar@~2.2.1: + fstream "^1.0.12" + inherits "2" + +-tar@^6.0.5, tar@^6.1.2: ++tar@^6.0.5: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== +@@ -8554,6 +8570,18 @@ tar@^6.1.11, tar@^6.1.12: + mkdirp "^1.0.3" + yallist "^4.0.0" + ++tar@^6.2.1: ++ version "6.2.1" ++ resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" ++ integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== ++ dependencies: ++ chownr "^2.0.0" ++ fs-minipass "^2.0.0" ++ minipass "^5.0.0" ++ minizlib "^2.1.1" ++ mkdirp "^1.0.3" ++ yallist "^4.0.0" ++ + temp-file@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/temp-file/-/temp-file-3.4.0.tgz#766ea28911c683996c248ef1a20eea04d51652c7" diff --git a/pkgs/by-name/ta/tabby-terminal/package.nix b/pkgs/by-name/ta/tabby-terminal/package.nix index 5de605294f867..98aa7fea66bcd 100644 --- a/pkgs/by-name/ta/tabby-terminal/package.nix +++ b/pkgs/by-name/ta/tabby-terminal/package.nix @@ -8,7 +8,7 @@ yarn, git, patch-package, - electron_29, + electron_32, prefetch-yarn-deps, fixup-yarn-lock, python3, @@ -19,6 +19,9 @@ libsecret, makeDesktopItem, copyDesktopItems, + jq, + moreutils, + applyPatches, }: let @@ -26,13 +29,17 @@ let pname = "tabby-terminal"; version = "1.0.215"; - src = fetchFromGitHub { - owner = "Eugeny"; - repo = "tabby"; - tag = "v${version}"; - hash = "sha256-l3Hyt3e1edJjb7vL66JDllkpHwTU5efsNbgJ5Pcvn60="; - leaveDotGit = true; - deepClone = true; + # We need to apply dependency patches extremely early as patchPhase runs AFTER the derivations for the yarn caches are computed. + src = applyPatches { + src = fetchFromGitHub { + owner = "Eugeny"; + repo = "tabby"; + tag = "v${version}"; + hash = "sha256-0yItlAbHqAZzrHiuAVWfcqIjcRAW+VtnRN7HWAKNsAw="; + leaveDotGit = true; + deepClone = true; + }; + patches = [ ./fix-deps-for-new-electron.patch ./splice-argv.patch ]; }; meta = { @@ -41,18 +48,9 @@ let license = lib.licenses.mit; mainProgram = "tabby"; maintainers = with lib.maintainers; [ geodic ]; - platforms = [ - "x86_64-linux" - "aarch64-linux" - ]; + platforms = lib.platforms.linux; }; - # We need to fix the argv logic as tabby only handles it for the node executable, but we are running it with electron - patches = [ - ./fix-argv-prefix-splice.patch - ./fix-app-version.patch - ]; - desktopItems = [ (makeDesktopItem { name = "tabby"; @@ -68,23 +66,23 @@ let }) ]; - electronVersion = "29.4.6"; + electronPackage = electron_32; electronHeaders = fetchurl { - url = "https://www.electronjs.org/headers/v${electronVersion}/node-v${electronVersion}-headers.tar.gz"; - hash = "sha256-e0qiEGI/1rWK72oLXfKtbbc8KmOGMhMx4IbT6MGAjms="; + url = "https://www.electronjs.org/headers/v${electronPackage.version}/node-v${electronPackage.version}-headers.tar.gz"; + hash = "sha256-D9j1wSDzartWUfDm2UrZDrgum2X+vV+DpDlKPFCtBbA="; }; electronHeadersSHA = fetchurl { - url = "https://www.electronjs.org/headers/v${electronVersion}/SHASUMS256.txt"; - hash = "sha256-0mCnKIR3GS1TL+g0h+y2cAlqbBogf88WxN8xJvmFl4g="; + url = "https://www.electronjs.org/headers/v${electronPackage.version}/SHASUMS256.txt"; + hash = "sha256-ZnWVCzTwwog4kgeFAZGsM2F2mmebrpXMVMxn/K+LWlU="; }; buildInputs = [ nodejs python3 fontconfig - electron_29 + electronPackage ]; nativeBuildInputs = [ @@ -102,10 +100,22 @@ let pkg-config libsecret copyDesktopItems + jq + moreutils ]; + patchPhase = '' + runHook prePatch + + jq '.version = "${version}"' app/package.json | sponge app/package.json + + runHook postPatch + ''; + configurePhase = '' + runHook preConfigure + export buildDir=$PWD '' # Loop through all the yarn caches and install the deps for the respective package @@ -134,6 +144,8 @@ let ) + '' cd $buildDir + + runHook postConfigure ''; buildPhase = @@ -141,15 +153,15 @@ let '' runHook preBuild - mkdir -p http-cache/v${electronVersion} - cp $electronHeaders http-cache/v${electronVersion}/node-v${electronVersion}-headers.tar.gz - cp $electronHeadersSHA http-cache/v${electronVersion}/SHASUMS256.txt + mkdir -p http-cache/v${electronPackage.version} + cp $electronHeaders http-cache/v${electronPackage.version}/node-v${electronPackage.version}-headers.tar.gz + cp $electronHeadersSHA http-cache/v${electronPackage.version}/SHASUMS256.txt http-server http-cache & '' # Rebuild all the needed packages using electron-rebuild + builtins.concatStringsSep "\n" ( map (pkg: '' - yarn --offline electron-rebuild -v ${electronVersion} -m ${pkg} -f -d "http://localhost:8080" + yarn --offline electron-rebuild -v ${electronPackage.version} -m ${pkg} -f -d "http://localhost:8080" '') rebuildPkgs ) + '' @@ -167,7 +179,7 @@ let cp -r . $out/share/tabby # Tabby needs TABBY_DEV to run manually with electron - makeWrapper "${electron_29}/bin/electron" "$out/bin/tabby" --add-flags "$out/share/tabby/app" --set TABBY_DEV 1 + makeWrapper "${electronPackage}/bin/electron" "$out/bin/tabby" --add-flags "$out/share/tabby/app" --set TABBY_DEV 1 for iconsize in 16 32 64 128 do @@ -203,8 +215,8 @@ let ]; pkgHashes = { - "." = "sha256-Qklo8iX27lE6VTUAX1bwa9yBw/tMx+G+FB2MJUkt+7s="; - app = "sha256-wo/ZhfyngBeagoYlzthsUSVNnSTaz+cHZD5dx9X8nP8="; + "." = "sha256-W4T9Vaow37yBD08UFv7Wby2OKiz/Lp70OXddGjTckxU="; + app = "sha256-pTHCyxx7pXKyITKzV3nrtdPX7ZUc+7oBMO3E8Py4Uiw="; web = "sha256-kdER/yB8O7gfWnLZ/rNl4ha1eNnypcVmS1L7RrFCn0Q="; tabby-core = "sha256-Z42TZeE0z96ZRtIFIgGbQyv8gtGY/Llya/Dhs8JtuWo="; tabby-local = "sha256-GmVoeKxF8Sj55fDPN4GhwGVXoktdiwF3EFYTJHGO/NQ="; diff --git a/pkgs/by-name/ta/tabby-terminal/splice-argv.patch b/pkgs/by-name/ta/tabby-terminal/splice-argv.patch new file mode 100644 index 0000000000000..f850cb1177d2f --- /dev/null +++ b/pkgs/by-name/ta/tabby-terminal/splice-argv.patch @@ -0,0 +1,17 @@ +diff --git a/app/lib/cli.ts b/app/lib/cli.ts +index 03213dd8..2ff31389 100644 +--- a/app/lib/cli.ts ++++ b/app/lib/cli.ts +@@ -1,9 +1,9 @@ + import { app } from 'electron' + + export function parseArgs (argv: string[], cwd: string): any { +- if (argv[0].includes('node')) { +- argv = argv.slice(1) +- } ++ ++ // This is because we are running with electron ++ argv = argv.slice(1) + + return require('yargs/yargs')(argv.slice(1)) + .usage('tabby [command] [arguments]')