typescript: repackage using buildNpmPackage (#239189)

authored by

Mario Rodas and committed by
GitHub
0bc45479 89a9b36d

+37 -34
+2 -2
pkgs/applications/graphics/weylus/default.nix
··· 17 , git 18 , autoconf 19 , libtool 20 - , nodePackages 21 , ApplicationServices 22 , Carbon 23 , Cocoa ··· 65 nativeBuildInputs = [ 66 cmake 67 git 68 - nodePackages.typescript 69 makeWrapper 70 ] ++ lib.optionals stdenv.isLinux [ 71 pkg-config
··· 17 , git 18 , autoconf 19 , libtool 20 + , typescript 21 , ApplicationServices 22 , Carbon 23 , Cocoa ··· 65 nativeBuildInputs = [ 66 cmake 67 git 68 + typescript 69 makeWrapper 70 ] ++ lib.optionals stdenv.isLinux [ 71 pkg-config
+2 -2
pkgs/desktops/gnome/extensions/pop-shell/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, glib, nodePackages, gjs }: 2 3 stdenv.mkDerivation rec { 4 pname = "gnome-shell-extension-pop-shell"; ··· 11 hash = "sha256-w6EBHKWJ4L3ZRVmFqZhCqHGumbElQXk9udYSnwjIl6c="; 12 }; 13 14 - nativeBuildInputs = [ glib nodePackages.typescript gjs ]; 15 16 buildInputs = [ gjs ]; 17
··· 1 + { stdenv, lib, fetchFromGitHub, glib, gjs, typescript }: 2 3 stdenv.mkDerivation rec { 4 pname = "gnome-shell-extension-pop-shell"; ··· 11 hash = "sha256-w6EBHKWJ4L3ZRVmFqZhCqHGumbElQXk9udYSnwjIl6c="; 12 }; 13 14 + nativeBuildInputs = [ glib gjs typescript ]; 15 16 buildInputs = [ gjs ]; 17
+24
pkgs/development/compilers/typescript/default.nix
···
··· 1 + { lib, buildNpmPackage, fetchFromGitHub }: 2 + 3 + buildNpmPackage rec { 4 + pname = "typescript"; 5 + version = "5.1.3"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "microsoft"; 9 + repo = "TypeScript"; 10 + rev = "v${version}"; 11 + hash = "sha256-c+ZI58Zk6TXwJoWUAXeIMToT+e7Ozdn7hxiDpPjeQJg="; 12 + }; 13 + 14 + npmDepsHash = "sha256-RHiUhhkzkr2Ra3wc1d13gE2WIZL49w7IEFEAZuBDTDI="; 15 + 16 + meta = with lib; { 17 + description = "A superset of JavaScript that compiles to clean JavaScript output"; 18 + homepage = "https://github.com/microsoft/TypeScript"; 19 + changelog = "https://github.com/microsoft/TypeScript/releases/tag/v${version}"; 20 + license = licenses.asl20; 21 + maintainers = [ maintainers.marsam ]; 22 + mainProgram = "tsc"; 23 + }; 24 + }
+1 -1
pkgs/development/haskell-modules/configuration-nix.nix
··· 1034 1035 # the testsuite fails because of not finding tsc without some help 1036 aeson-typescript = overrideCabal (drv: { 1037 - testToolDepends = drv.testToolDepends or [] ++ [ pkgs.nodePackages.typescript ]; 1038 # the testsuite assumes that tsc is in the PATH if it thinks it's in 1039 # CI, otherwise trying to install it. 1040 #
··· 1034 1035 # the testsuite fails because of not finding tsc without some help 1036 aeson-typescript = overrideCabal (drv: { 1037 + testToolDepends = drv.testToolDepends or [] ++ [ pkgs.typescript ]; 1038 # the testsuite assumes that tsc is in the PATH if it thinks it's in 1039 # CI, otherwise trying to install it. 1040 #
+1
pkgs/development/node-packages/aliases.nix
··· 47 readability-cli = pkgs.readability-cli; # Added 2023-06-12 48 thelounge = pkgs.thelounge; # Added 2023-05-22 49 triton = pkgs.triton; # Added 2023-05-06 50 vscode-langservers-extracted = pkgs.vscode-langservers-extracted; # Added 2023-05-27 51 }
··· 47 readability-cli = pkgs.readability-cli; # Added 2023-06-12 48 thelounge = pkgs.thelounge; # Added 2023-05-22 49 triton = pkgs.triton; # Added 2023-05-06 50 + typescript = pkgs.typescript; # Added 2023-06-21 51 vscode-langservers-extracted = pkgs.vscode-langservers-extracted; # Added 2023-05-27 52 }
-1
pkgs/development/node-packages/main-programs.nix
··· 8 "@squoosh/cli" = "squoosh-cli"; 9 "@webassemblyjs/cli-1.11.1" = "wasm2wast"; 10 coffee-script = "coffee"; 11 - typescript = "tsc"; 12 vue-cli = "vue"; 13 "@withgraphite/graphite-cli" = "gt"; 14
··· 8 "@squoosh/cli" = "squoosh-cli"; 9 "@webassemblyjs/cli-1.11.1" = "wasm2wast"; 10 coffee-script = "coffee"; 11 vue-cli = "vue"; 12 "@withgraphite/graphite-cli" = "gt"; 13
-1
pkgs/development/node-packages/node-packages.json
··· 364 , "tsun" 365 , "ts-node" 366 , "ttf2eot" 367 - , "typescript" 368 , "typescript-language-server" 369 , "uglify-js" 370 , "undollar"
··· 364 , "tsun" 365 , "ts-node" 366 , "ttf2eot" 367 , "typescript-language-server" 368 , "uglify-js" 369 , "undollar"
-18
pkgs/development/node-packages/node-packages.nix
··· 142185 bypassCache = true; 142186 reconstructLock = true; 142187 }; 142188 - typescript = nodeEnv.buildNodePackage { 142189 - name = "typescript"; 142190 - packageName = "typescript"; 142191 - version = "5.1.3"; 142192 - src = fetchurl { 142193 - url = "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz"; 142194 - sha512 = "XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw=="; 142195 - }; 142196 - buildInputs = globalBuildInputs; 142197 - meta = { 142198 - description = "TypeScript is a language for application scale JavaScript development"; 142199 - homepage = "https://www.typescriptlang.org/"; 142200 - license = "Apache-2.0"; 142201 - }; 142202 - production = true; 142203 - bypassCache = true; 142204 - reconstructLock = true; 142205 - }; 142206 typescript-language-server = nodeEnv.buildNodePackage { 142207 name = "typescript-language-server"; 142208 packageName = "typescript-language-server";
··· 142185 bypassCache = true; 142186 reconstructLock = true; 142187 }; 142188 typescript-language-server = nodeEnv.buildNodePackage { 142189 name = "typescript-language-server"; 142190 packageName = "typescript-language-server";
+3 -3
pkgs/development/node-packages/overrides.nix
··· 521 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 522 postInstall = '' 523 wrapProgram "$out/bin/ts-node" \ 524 - --prefix NODE_PATH : ${final.typescript}/lib/node_modules 525 ''; 526 }; 527 ··· 529 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 530 postInstall = '' 531 wrapProgram "$out/bin/tsun" \ 532 - --prefix NODE_PATH : ${final.typescript}/lib/node_modules 533 ''; 534 }; 535 536 typescript-language-server = prev.typescript-language-server.override { 537 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 538 postInstall = '' 539 - ${pkgs.xorg.lndir}/bin/lndir ${final.typescript} $out 540 ''; 541 }; 542
··· 521 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 522 postInstall = '' 523 wrapProgram "$out/bin/ts-node" \ 524 + --prefix NODE_PATH : ${pkgs.typescript}/lib/node_modules 525 ''; 526 }; 527 ··· 529 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 530 postInstall = '' 531 wrapProgram "$out/bin/tsun" \ 532 + --prefix NODE_PATH : ${pkgs.typescript}/lib/node_modules 533 ''; 534 }; 535 536 typescript-language-server = prev.typescript-language-server.override { 537 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 538 postInstall = '' 539 + ${pkgs.xorg.lndir}/bin/lndir ${pkgs.typescript} $out 540 ''; 541 }; 542
+2 -2
pkgs/development/tools/misc/ycmd/default.nix
··· 2 , withGocode ? true, gocode 3 , withGodef ? true, godef 4 , withGotools? true, gotools 5 - , withTypescript ? true, nodePackages 6 , abseil-cpp, boost, llvmPackages 7 , fixDarwinDylibNames, Cocoa 8 }: ··· 77 ln -sf ${gotools}/bin/gopls $TARGET 78 '' + lib.optionalString withTypescript '' 79 TARGET=$out/lib/ycmd/third_party/tsserver 80 - ln -sf ${nodePackages.typescript} $TARGET 81 ''; 82 83 # fixup the argv[0] and replace __file__ with the corresponding path so
··· 2 , withGocode ? true, gocode 3 , withGodef ? true, godef 4 , withGotools? true, gotools 5 + , withTypescript ? true, typescript 6 , abseil-cpp, boost, llvmPackages 7 , fixDarwinDylibNames, Cocoa 8 }: ··· 77 ln -sf ${gotools}/bin/gopls $TARGET 78 '' + lib.optionalString withTypescript '' 79 TARGET=$out/lib/ycmd/third_party/tsserver 80 + ln -sf ${typescript} $TARGET 81 ''; 82 83 # fixup the argv[0] and replace __file__ with the corresponding path so
+2 -4
pkgs/top-level/all-packages.nix
··· 16925 16926 tbox = callPackage ../development/libraries/tbox { }; 16927 16928 - inherit (nodePackages) typescript; 16929 16930 bupc = callPackage ../development/compilers/bupc { }; 16931 ··· 32016 32017 img2pdf = with python3Packages; toPythonApplication img2pdf; 32018 32019 - imgbrd-grabber = qt5.callPackage ../applications/graphics/imgbrd-grabber { 32020 - typescript = nodePackages.typescript; 32021 - }; 32022 32023 imgcat = callPackage ../applications/graphics/imgcat { }; 32024
··· 16925 16926 tbox = callPackage ../development/libraries/tbox { }; 16927 16928 + typescript = callPackage ../development/compilers/typescript { }; 16929 16930 bupc = callPackage ../development/compilers/bupc { }; 16931 ··· 32016 32017 img2pdf = with python3Packages; toPythonApplication img2pdf; 32018 32019 + imgbrd-grabber = qt5.callPackage ../applications/graphics/imgbrd-grabber { }; 32020 32021 imgcat = callPackage ../applications/graphics/imgcat { }; 32022