From 937b420b663f3ae0727f152c7b2cb2de32876aa3 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 11 Apr 2024 09:15:41 -0300 Subject: [PATCH] vscode-extensions.jackmacwindows.craftos-pc: move to a directory --- .../editors/vscode/extensions/default.nix | 34 +-------------- .../jackmacwindows.craftos-pc/default.nix | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 pkgs/applications/editors/vscode/extensions/jackmacwindows.craftos-pc/default.nix diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index fc055d569c47..dba41b89a4db 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -18,7 +18,6 @@ , racket , alejandra , millet -, craftos-pc , shfmt , tinymist , typst-lsp @@ -2273,38 +2272,7 @@ let }; }; - jackmacwindows.craftos-pc = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "craftos-pc"; - publisher = "jackmacwindows"; - version = "1.2.2"; - hash = "sha256-A+MNroXv0t9Mw/gr0Fyov3cXyF/GGzwRLKrIxQ2tKCE="; - }; - nativeBuildInputs = [ jq moreutils ]; - postInstall = '' - cd "$out/$installPrefix" - - jq -e ' - .contributes.configuration.properties."craftos-pc.executablePath.linux".default = - "${lib.meta.getExe craftos-pc}" | - .contributes.configuration.properties."craftos-pc.executablePath.mac".default = - "${lib.meta.getExe craftos-pc}" | - .contributes.configuration.properties."craftos-pc.executablePath.windows".default = - "${lib.meta.getExe craftos-pc}" - ' \ - < package.json \ - | sponge package.json - ''; - meta = { - changelog = "https://marketplace.visualstudio.com/items/jackmacwindows.craftos-pc/changelog"; - description = "A Visual Studio Code extension for opening a CraftOS-PC window"; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=jackmacwindows.craftos-pc"; - homepage = "https://www.craftos-pc.cc/docs/extension"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ tomodachi94 ]; - platforms = craftos-pc.meta.platforms; - }; - }; + jackmacwindows.craftos-pc = callPackage ./jackmacwindows.craftos-pc { }; james-yu.latex-workshop = buildVscodeMarketplaceExtension { mktplcRef = { diff --git a/pkgs/applications/editors/vscode/extensions/jackmacwindows.craftos-pc/default.nix b/pkgs/applications/editors/vscode/extensions/jackmacwindows.craftos-pc/default.nix new file mode 100644 index 000000000000..005f78f4f4ae --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/jackmacwindows.craftos-pc/default.nix @@ -0,0 +1,43 @@ +{ + vscode-utils, + craftos-pc, + jq, + lib, + moreutils, +}: + +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "craftos-pc"; + publisher = "jackmacwindows"; + version = "1.2.2"; + hash = "sha256-A+MNroXv0t9Mw/gr0Fyov3cXyF/GGzwRLKrIxQ2tKCE="; + }; + nativeBuildInputs = [ + jq + moreutils + ]; + postInstall = '' + cd "$out/$installPrefix" + + jq -e ' + .contributes.configuration.properties."craftos-pc.executablePath.linux".default = + "${lib.meta.getExe craftos-pc}" | + .contributes.configuration.properties."craftos-pc.executablePath.mac".default = + "${lib.meta.getExe craftos-pc}" | + .contributes.configuration.properties."craftos-pc.executablePath.windows".default = + "${lib.meta.getExe craftos-pc}" + ' \ + < package.json \ + | sponge package.json + ''; + meta = { + changelog = "https://marketplace.visualstudio.com/items/jackmacwindows.craftos-pc/changelog"; + description = "A Visual Studio Code extension for opening a CraftOS-PC window"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=jackmacwindows.craftos-pc"; + homepage = "https://www.craftos-pc.cc/docs/extension"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ tomodachi94 ]; + platforms = craftos-pc.meta.platforms; + }; +}