typescript: repackage using buildNpmPackage (#239189)
This commit is contained in:
parent
89a9b36d69
commit
0bc4547952
|
@ -17,7 +17,7 @@
|
|||
, git
|
||||
, autoconf
|
||||
, libtool
|
||||
, nodePackages
|
||||
, typescript
|
||||
, ApplicationServices
|
||||
, Carbon
|
||||
, Cocoa
|
||||
|
@ -65,7 +65,7 @@ rustPlatform.buildRustPackage rec {
|
|||
nativeBuildInputs = [
|
||||
cmake
|
||||
git
|
||||
nodePackages.typescript
|
||||
typescript
|
||||
makeWrapper
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
pkg-config
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, lib, fetchFromGitHub, glib, nodePackages, gjs }:
|
||||
{ stdenv, lib, fetchFromGitHub, glib, gjs, typescript }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnome-shell-extension-pop-shell";
|
||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||
hash = "sha256-w6EBHKWJ4L3ZRVmFqZhCqHGumbElQXk9udYSnwjIl6c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ glib nodePackages.typescript gjs ];
|
||||
nativeBuildInputs = [ glib gjs typescript ];
|
||||
|
||||
buildInputs = [ gjs ];
|
||||
|
||||
|
|
24
pkgs/development/compilers/typescript/default.nix
Normal file
24
pkgs/development/compilers/typescript/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ lib, buildNpmPackage, fetchFromGitHub }:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "typescript";
|
||||
version = "5.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "microsoft";
|
||||
repo = "TypeScript";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-c+ZI58Zk6TXwJoWUAXeIMToT+e7Ozdn7hxiDpPjeQJg=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-RHiUhhkzkr2Ra3wc1d13gE2WIZL49w7IEFEAZuBDTDI=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A superset of JavaScript that compiles to clean JavaScript output";
|
||||
homepage = "https://github.com/microsoft/TypeScript";
|
||||
changelog = "https://github.com/microsoft/TypeScript/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.marsam ];
|
||||
mainProgram = "tsc";
|
||||
};
|
||||
}
|
|
@ -1034,7 +1034,7 @@ self: super: builtins.intersectAttrs super {
|
|||
|
||||
# the testsuite fails because of not finding tsc without some help
|
||||
aeson-typescript = overrideCabal (drv: {
|
||||
testToolDepends = drv.testToolDepends or [] ++ [ pkgs.nodePackages.typescript ];
|
||||
testToolDepends = drv.testToolDepends or [] ++ [ pkgs.typescript ];
|
||||
# the testsuite assumes that tsc is in the PATH if it thinks it's in
|
||||
# CI, otherwise trying to install it.
|
||||
#
|
||||
|
|
|
@ -47,5 +47,6 @@ mapAliases {
|
|||
readability-cli = pkgs.readability-cli; # Added 2023-06-12
|
||||
thelounge = pkgs.thelounge; # Added 2023-05-22
|
||||
triton = pkgs.triton; # Added 2023-05-06
|
||||
typescript = pkgs.typescript; # Added 2023-06-21
|
||||
vscode-langservers-extracted = pkgs.vscode-langservers-extracted; # Added 2023-05-27
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
"@squoosh/cli" = "squoosh-cli";
|
||||
"@webassemblyjs/cli-1.11.1" = "wasm2wast";
|
||||
coffee-script = "coffee";
|
||||
typescript = "tsc";
|
||||
vue-cli = "vue";
|
||||
"@withgraphite/graphite-cli" = "gt";
|
||||
|
||||
|
|
|
@ -364,7 +364,6 @@
|
|||
, "tsun"
|
||||
, "ts-node"
|
||||
, "ttf2eot"
|
||||
, "typescript"
|
||||
, "typescript-language-server"
|
||||
, "uglify-js"
|
||||
, "undollar"
|
||||
|
|
18
pkgs/development/node-packages/node-packages.nix
generated
18
pkgs/development/node-packages/node-packages.nix
generated
|
@ -142185,24 +142185,6 @@ in
|
|||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
typescript = nodeEnv.buildNodePackage {
|
||||
name = "typescript";
|
||||
packageName = "typescript";
|
||||
version = "5.1.3";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz";
|
||||
sha512 = "XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==";
|
||||
};
|
||||
buildInputs = globalBuildInputs;
|
||||
meta = {
|
||||
description = "TypeScript is a language for application scale JavaScript development";
|
||||
homepage = "https://www.typescriptlang.org/";
|
||||
license = "Apache-2.0";
|
||||
};
|
||||
production = true;
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
typescript-language-server = nodeEnv.buildNodePackage {
|
||||
name = "typescript-language-server";
|
||||
packageName = "typescript-language-server";
|
||||
|
|
|
@ -521,7 +521,7 @@ final: prev: {
|
|||
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/ts-node" \
|
||||
--prefix NODE_PATH : ${final.typescript}/lib/node_modules
|
||||
--prefix NODE_PATH : ${pkgs.typescript}/lib/node_modules
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -529,14 +529,14 @@ final: prev: {
|
|||
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/tsun" \
|
||||
--prefix NODE_PATH : ${final.typescript}/lib/node_modules
|
||||
--prefix NODE_PATH : ${pkgs.typescript}/lib/node_modules
|
||||
'';
|
||||
};
|
||||
|
||||
typescript-language-server = prev.typescript-language-server.override {
|
||||
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
|
||||
postInstall = ''
|
||||
${pkgs.xorg.lndir}/bin/lndir ${final.typescript} $out
|
||||
${pkgs.xorg.lndir}/bin/lndir ${pkgs.typescript} $out
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
, withGocode ? true, gocode
|
||||
, withGodef ? true, godef
|
||||
, withGotools? true, gotools
|
||||
, withTypescript ? true, nodePackages
|
||||
, withTypescript ? true, typescript
|
||||
, abseil-cpp, boost, llvmPackages
|
||||
, fixDarwinDylibNames, Cocoa
|
||||
}:
|
||||
|
@ -77,7 +77,7 @@ stdenv.mkDerivation {
|
|||
ln -sf ${gotools}/bin/gopls $TARGET
|
||||
'' + lib.optionalString withTypescript ''
|
||||
TARGET=$out/lib/ycmd/third_party/tsserver
|
||||
ln -sf ${nodePackages.typescript} $TARGET
|
||||
ln -sf ${typescript} $TARGET
|
||||
'';
|
||||
|
||||
# fixup the argv[0] and replace __file__ with the corresponding path so
|
||||
|
|
|
@ -16925,7 +16925,7 @@ with pkgs;
|
|||
|
||||
tbox = callPackage ../development/libraries/tbox { };
|
||||
|
||||
inherit (nodePackages) typescript;
|
||||
typescript = callPackage ../development/compilers/typescript { };
|
||||
|
||||
bupc = callPackage ../development/compilers/bupc { };
|
||||
|
||||
|
@ -32016,9 +32016,7 @@ with pkgs;
|
|||
|
||||
img2pdf = with python3Packages; toPythonApplication img2pdf;
|
||||
|
||||
imgbrd-grabber = qt5.callPackage ../applications/graphics/imgbrd-grabber {
|
||||
typescript = nodePackages.typescript;
|
||||
};
|
||||
imgbrd-grabber = qt5.callPackage ../applications/graphics/imgbrd-grabber { };
|
||||
|
||||
imgcat = callPackage ../applications/graphics/imgcat { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue