3
0
Fork 0
forked from mirrors/nixpkgs

vscode: add commandLineArgs

This commit is contained in:
SamLukeYes 2022-09-03 23:10:49 +08:00
parent 1ddc9b4b1b
commit 2c4f8fca9a
3 changed files with 9 additions and 4 deletions

View file

@ -11,7 +11,7 @@
, nodePackages, bash
# Attributes inherit from specific versions
, version, src, meta, sourceRoot
, version, src, meta, sourceRoot, commandLineArgs
, executableName, longName, shortName, pname, updateScript
# sourceExecutableName is the name of the binary in the source archive, over
# which we have no control
@ -110,6 +110,7 @@ let
# Add gio to PATH so that moving files to the trash works when not using a desktop environment
--prefix PATH : ${glib.bin}/bin
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags ${lib.escapeShellArg commandLineArgs}
)
'';

View file

@ -1,4 +1,7 @@
{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
{ stdenv, lib, callPackage, fetchurl
, isInsiders ? false
, commandLineArgs ? ""
}:
let
inherit (stdenv.hostPlatform) system;
@ -31,6 +34,7 @@ in
executableName = "code" + lib.optionalString isInsiders "-insiders";
longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders";
shortName = "Code" + lib.optionalString isInsiders " - Insiders";
inherit commandLineArgs;
src = fetchurl {
name = "VSCode_${version}_${plat}.${archive_fmt}";

View file

@ -1,4 +1,4 @@
{ lib, stdenv, callPackage, fetchurl, nixosTests }:
{ lib, stdenv, callPackage, fetchurl, nixosTests, commandLineArgs ? "" }:
let
inherit (stdenv.hostPlatform) system;
@ -25,7 +25,7 @@ let
sourceRoot = if stdenv.isDarwin then "" else ".";
in
callPackage ./generic.nix rec {
inherit sourceRoot;
inherit sourceRoot commandLineArgs;
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.