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 17 , git 18 18 , autoconf 19 19 , libtool 20 - , nodePackages 20 + , typescript 21 21 , ApplicationServices 22 22 , Carbon 23 23 , Cocoa ··· 65 65 nativeBuildInputs = [ 66 66 cmake 67 67 git 68 - nodePackages.typescript 68 + typescript 69 69 makeWrapper 70 70 ] ++ lib.optionals stdenv.isLinux [ 71 71 pkg-config
+2 -2
pkgs/desktops/gnome/extensions/pop-shell/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, glib, nodePackages, gjs }: 1 + { stdenv, lib, fetchFromGitHub, glib, gjs, typescript }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "gnome-shell-extension-pop-shell"; ··· 11 11 hash = "sha256-w6EBHKWJ4L3ZRVmFqZhCqHGumbElQXk9udYSnwjIl6c="; 12 12 }; 13 13 14 - nativeBuildInputs = [ glib nodePackages.typescript gjs ]; 14 + nativeBuildInputs = [ glib gjs typescript ]; 15 15 16 16 buildInputs = [ gjs ]; 17 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 1034 1035 1035 # the testsuite fails because of not finding tsc without some help 1036 1036 aeson-typescript = overrideCabal (drv: { 1037 - testToolDepends = drv.testToolDepends or [] ++ [ pkgs.nodePackages.typescript ]; 1037 + testToolDepends = drv.testToolDepends or [] ++ [ pkgs.typescript ]; 1038 1038 # the testsuite assumes that tsc is in the PATH if it thinks it's in 1039 1039 # CI, otherwise trying to install it. 1040 1040 #
+1
pkgs/development/node-packages/aliases.nix
··· 47 47 readability-cli = pkgs.readability-cli; # Added 2023-06-12 48 48 thelounge = pkgs.thelounge; # Added 2023-05-22 49 49 triton = pkgs.triton; # Added 2023-05-06 50 + typescript = pkgs.typescript; # Added 2023-06-21 50 51 vscode-langservers-extracted = pkgs.vscode-langservers-extracted; # Added 2023-05-27 51 52 }
-1
pkgs/development/node-packages/main-programs.nix
··· 8 8 "@squoosh/cli" = "squoosh-cli"; 9 9 "@webassemblyjs/cli-1.11.1" = "wasm2wast"; 10 10 coffee-script = "coffee"; 11 - typescript = "tsc"; 12 11 vue-cli = "vue"; 13 12 "@withgraphite/graphite-cli" = "gt"; 14 13
-1
pkgs/development/node-packages/node-packages.json
··· 364 364 , "tsun" 365 365 , "ts-node" 366 366 , "ttf2eot" 367 - , "typescript" 368 367 , "typescript-language-server" 369 368 , "uglify-js" 370 369 , "undollar"
-18
pkgs/development/node-packages/node-packages.nix
··· 142185 142185 bypassCache = true; 142186 142186 reconstructLock = true; 142187 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 142188 typescript-language-server = nodeEnv.buildNodePackage { 142207 142189 name = "typescript-language-server"; 142208 142190 packageName = "typescript-language-server";
+3 -3
pkgs/development/node-packages/overrides.nix
··· 521 521 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 522 522 postInstall = '' 523 523 wrapProgram "$out/bin/ts-node" \ 524 - --prefix NODE_PATH : ${final.typescript}/lib/node_modules 524 + --prefix NODE_PATH : ${pkgs.typescript}/lib/node_modules 525 525 ''; 526 526 }; 527 527 ··· 529 529 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 530 530 postInstall = '' 531 531 wrapProgram "$out/bin/tsun" \ 532 - --prefix NODE_PATH : ${final.typescript}/lib/node_modules 532 + --prefix NODE_PATH : ${pkgs.typescript}/lib/node_modules 533 533 ''; 534 534 }; 535 535 536 536 typescript-language-server = prev.typescript-language-server.override { 537 537 nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ]; 538 538 postInstall = '' 539 - ${pkgs.xorg.lndir}/bin/lndir ${final.typescript} $out 539 + ${pkgs.xorg.lndir}/bin/lndir ${pkgs.typescript} $out 540 540 ''; 541 541 }; 542 542
+2 -2
pkgs/development/tools/misc/ycmd/default.nix
··· 2 2 , withGocode ? true, gocode 3 3 , withGodef ? true, godef 4 4 , withGotools? true, gotools 5 - , withTypescript ? true, nodePackages 5 + , withTypescript ? true, typescript 6 6 , abseil-cpp, boost, llvmPackages 7 7 , fixDarwinDylibNames, Cocoa 8 8 }: ··· 77 77 ln -sf ${gotools}/bin/gopls $TARGET 78 78 '' + lib.optionalString withTypescript '' 79 79 TARGET=$out/lib/ycmd/third_party/tsserver 80 - ln -sf ${nodePackages.typescript} $TARGET 80 + ln -sf ${typescript} $TARGET 81 81 ''; 82 82 83 83 # fixup the argv[0] and replace __file__ with the corresponding path so
+2 -4
pkgs/top-level/all-packages.nix
··· 16925 16925 16926 16926 tbox = callPackage ../development/libraries/tbox { }; 16927 16927 16928 - inherit (nodePackages) typescript; 16928 + typescript = callPackage ../development/compilers/typescript { }; 16929 16929 16930 16930 bupc = callPackage ../development/compilers/bupc { }; 16931 16931 ··· 32016 32016 32017 32017 img2pdf = with python3Packages; toPythonApplication img2pdf; 32018 32018 32019 - imgbrd-grabber = qt5.callPackage ../applications/graphics/imgbrd-grabber { 32020 - typescript = nodePackages.typescript; 32021 - }; 32019 + imgbrd-grabber = qt5.callPackage ../applications/graphics/imgbrd-grabber { }; 32022 32020 32023 32021 imgcat = callPackage ../applications/graphics/imgcat { }; 32024 32022