about summary refs log tree commit diff
path: root/pkgs/applications/editors/vscode/vscode.nix
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-06-14 17:05:32 +0200
committerGitHub <noreply@github.com>2023-06-14 17:05:32 +0200
commit60d31a2a463af919bffb603bf7f4058753e22c05 (patch)
tree2e8c27ae0908a28b51572d431f4716f5676a740d /pkgs/applications/editors/vscode/vscode.nix
parent39b3edb19d29865da7d09b8590594e4ec2167cd3 (diff)
parent8bf8b8fd68b644f3c1ab3a52464173212da2dfaf (diff)
Merge pull request #207646 from Enzime/vsce/test-remote-ssh
Diffstat (limited to 'pkgs/applications/editors/vscode/vscode.nix')
-rw-r--r--pkgs/applications/editors/vscode/vscode.nix24
1 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix
index e1f291ebcd38d..744d9ea9186e5 100644
--- a/pkgs/applications/editors/vscode/vscode.nix
+++ b/pkgs/applications/editors/vscode/vscode.nix
@@ -1,4 +1,9 @@
-{ stdenv, lib, callPackage, fetchurl
+{ stdenv
+, lib
+, callPackage
+, fetchurl
+, nixosTests
+, srcOnly
 , isInsiders ? false
 , commandLineArgs ? ""
 , useVSCodeRipgrep ? stdenv.isDarwin
@@ -32,6 +37,9 @@ in
     version = "1.79.1";
     pname = "vscode";
 
+    # This is used for VS Code - Remote SSH test
+    rev = "b380da4ef1ee00e224a15c1d4d9793e27c2b6302";
+
     executableName = "code" + lib.optionalString isInsiders "-insiders";
     longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders";
     shortName = "Code" + lib.optionalString isInsiders " - Insiders";
@@ -48,6 +56,18 @@ in
 
     sourceRoot = "";
 
+    # As tests run without networking, we need to download this for the Remote SSH server
+    vscodeServer = srcOnly {
+      name = "vscode-server-${rev}.tar.gz";
+      src = fetchurl {
+        name = "vscode-server-${rev}.tar.gz";
+        url = "https://update.code.visualstudio.com/commit:${rev}/server-linux-x64/stable";
+        sha256 = "0732wpl4fjknhn423k23zrcqz9psjj1iy8lqa0fc8970n1m7i58b";
+      };
+    };
+
+    tests = { inherit (nixosTests) vscode-remote-ssh; };
+
     updateScript = ./update-vscode.sh;
 
     # Editing the `code` binary within the app bundle causes the bundle's signature
@@ -71,7 +91,7 @@ in
       homepage = "https://code.visualstudio.com/";
       downloadPage = "https://code.visualstudio.com/Updates";
       license = licenses.unfree;
-      maintainers = with maintainers; [ eadwu synthetica maxeaubrey bobby285271 ];
+      maintainers = with maintainers; [ eadwu synthetica maxeaubrey bobby285271 Enzime ];
       platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7l-linux" ];
     };
   }