diff --git a/pkgs/by-name/el/element-call/package.json b/pkgs/by-name/el/element-call/package.json deleted file mode 100644 index 173927845525..000000000000 --- a/pkgs/by-name/el/element-call/package.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "name": "element-call", - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "NODE_OPTIONS=--max-old-space-size=16384 vite build", - "serve": "vite preview", - "prettier:check": "prettier -c .", - "prettier:format": "prettier -w .", - "lint": "yarn lint:types && yarn lint:eslint", - "lint:eslint": "eslint --max-warnings 0 src", - "lint:eslint-fix": "eslint --max-warnings 0 src --fix", - "lint:types": "tsc", - "i18n": "node_modules/i18next-parser/bin/cli.js", - "i18n:check": "node_modules/i18next-parser/bin/cli.js --fail-on-warnings --fail-on-update", - "test": "vitest", - "test:coverage": "vitest run --coverage", - "backend": "docker-compose -f backend-docker-compose.yml up" - }, - "dependencies": { - "@juggle/resize-observer": "^3.3.1", - "@livekit/components-core": "^0.10.0", - "@livekit/components-react": "^2.0.0", - "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz", - "@opentelemetry/api": "^1.4.0", - "@opentelemetry/context-zone": "^1.9.1", - "@opentelemetry/exporter-jaeger": "^1.9.1", - "@opentelemetry/exporter-trace-otlp-http": "^0.48.0", - "@opentelemetry/instrumentation-document-load": "^0.36.0", - "@opentelemetry/instrumentation-user-interaction": "^0.36.0", - "@opentelemetry/sdk-trace-web": "^1.9.1", - "@radix-ui/react-dialog": "^1.0.4", - "@radix-ui/react-slider": "^1.1.2", - "@radix-ui/react-visually-hidden": "^1.0.3", - "@react-aria/button": "^3.3.4", - "@react-aria/focus": "^3.5.0", - "@react-aria/menu": "^3.3.0", - "@react-aria/overlays": "^3.7.3", - "@react-aria/select": "^3.6.0", - "@react-aria/tabs": "^3.1.0", - "@react-aria/tooltip": "^3.1.3", - "@react-aria/utils": "^3.10.0", - "@react-rxjs/core": "^0.10.7", - "@react-spring/web": "^9.4.4", - "@react-stately/collections": "^3.3.4", - "@react-stately/select": "^3.1.3", - "@react-stately/tooltip": "^3.0.5", - "@react-stately/tree": "^3.2.0", - "@sentry/react": "^7.0.0", - "@sentry/tracing": "^7.0.0", - "@types/lodash": "^4.14.199", - "@use-gesture/react": "^10.2.11", - "@vector-im/compound-design-tokens": "^1.0.0", - "@vector-im/compound-web": "^3.0.0", - "@vitejs/plugin-basic-ssl": "^1.0.1", - "@vitejs/plugin-react": "^4.0.1", - "buffer": "^6.0.3", - "classnames": "^2.3.1", - "events": "^3.3.0", - "i18next": "^23.0.0", - "i18next-browser-languagedetector": "^7.0.0", - "i18next-http-backend": "^2.0.0", - "livekit-client": "^2.0.2", - "lodash": "^4.17.21", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#d55c6a36df539f6adacc335efe5b9be27c9cee4a", - "matrix-widget-api": "^1.3.1", - "normalize.css": "^8.0.1", - "pako": "^2.0.4", - "postcss-preset-env": "^9.0.0", - "posthog-js": "^1.29.0", - "react": "18", - "react-dom": "18", - "react-i18next": "^14.0.0", - "react-router-dom": "^5.2.0", - "react-use-clipboard": "^1.0.7", - "react-use-measure": "^2.1.1", - "rxjs": "^7.8.1", - "sdp-transform": "^2.14.1", - "tinyqueue": "^2.0.3", - "unique-names-generator": "^4.6.0", - "uuid": "9", - "vaul": "^0.9.0" - }, - "devDependencies": { - "@babel/core": "^7.16.5", - "@babel/preset-env": "^7.22.20", - "@babel/preset-react": "^7.22.15", - "@babel/preset-typescript": "^7.23.0", - "@react-spring/rafz": "^9.7.3", - "@react-types/dialog": "^3.5.5", - "@sentry/vite-plugin": "^2.0.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.5.1", - "@types/content-type": "^1.1.5", - "@types/dom-screen-wake-lock": "^1.0.1", - "@types/dompurify": "^3.0.2", - "@types/grecaptcha": "^3.0.4", - "@types/node": "^20.0.0", - "@types/react-router-dom": "^5.3.3", - "@types/request": "^2.48.8", - "@types/sdp-transform": "^2.4.5", - "@types/uuid": "9", - "@typescript-eslint/eslint-plugin": "^7.0.0", - "@typescript-eslint/parser": "^7.0.0", - "babel-loader": "^9.0.0", - "babel-plugin-transform-vite-meta-env": "^1.0.3", - "eslint": "^8.14.0", - "eslint-config-google": "^0.14.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-deprecate": "^0.8.2", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-matrix-org": "^1.2.1", - "eslint-plugin-react": "^7.29.4", - "eslint-plugin-react-hooks": "^4.5.0", - "eslint-plugin-unicorn": "^51.0.0", - "i18next-parser": "^8.0.0", - "jsdom": "^24.0.0", - "prettier": "^3.0.0", - "sass": "^1.42.1", - "typescript": "^5.1.6", - "typescript-eslint-language-service": "^5.0.5", - "vite": "^5.0.0", - "vite-plugin-html-template": "^1.1.0", - "vite-plugin-svgr": "^4.0.0", - "vitest": "^1.2.2" - } -} diff --git a/pkgs/by-name/el/element-call/package.nix b/pkgs/by-name/el/element-call/package.nix index da7f41222c16..835329fef295 100644 --- a/pkgs/by-name/el/element-call/package.nix +++ b/pkgs/by-name/el/element-call/package.nix @@ -1,8 +1,11 @@ { lib , stdenv -, mkYarnPackage , fetchFromGitHub , fetchYarnDeps +, yarnConfigHook +, yarnBuildHook +, nodejs +, npmHooks }: let @@ -15,38 +18,33 @@ let aarch64-darwin = "sha256-G4doEnZORJqcl3bWaKZPuQmBeXNXud06nLO12Afr9kM="; }.${system} or throwSystem; in -mkYarnPackage rec { +stdenv.mkDerivation (finalAttrs: { pname = "element-call"; version = "0.5.16"; src = fetchFromGitHub { owner = "element-hq"; repo = "element-call"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-GTHM27i716RZk+kDELMg/lYy355/SZoQLXGPQ90M4xg="; }; - packageJSON = ./package.json; - patches = [ ./name.patch ]; offlineCache = fetchYarnDeps { - yarnLock = "${src}/yarn.lock"; + yarnLock = "${finalAttrs.src}/yarn.lock"; hash = offlineCacheHash; }; - buildPhase = '' - runHook preBuild - yarn --offline run build - runHook postBuild - ''; - - preInstall = '' - mkdir $out - cp -R ./deps/element-call/dist $out - ''; - - doDist = false; + nativeBuildInputs = [ + yarnConfigHook + yarnBuildHook + nodejs + npmHooks.npmInstallHook + ]; + # From some reason causes the build to fail due to dependencies not available + # offline + dontNpmPrune = true; meta = with lib; { homepage = "https://github.com/element-hq/element-call"; @@ -55,4 +53,4 @@ mkYarnPackage rec { maintainers = with maintainers; [ kilimnik ]; mainProgram = "element-call"; }; -} +})