mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 14:04:52 +00:00
Merge pull request #187764 from SamLukeYes/vscode
This commit is contained in:
commit
7739d3ac37
@ -11,7 +11,7 @@
|
|||||||
, nodePackages, bash
|
, nodePackages, bash
|
||||||
|
|
||||||
# Attributes inherit from specific versions
|
# Attributes inherit from specific versions
|
||||||
, version, src, meta, sourceRoot
|
, version, src, meta, sourceRoot, commandLineArgs
|
||||||
, executableName, longName, shortName, pname, updateScript
|
, executableName, longName, shortName, pname, updateScript
|
||||||
# sourceExecutableName is the name of the binary in the source archive, over
|
# sourceExecutableName is the name of the binary in the source archive, over
|
||||||
# which we have no control
|
# 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
|
# Add gio to PATH so that moving files to the trash works when not using a desktop environment
|
||||||
--prefix PATH : ${glib.bin}/bin
|
--prefix PATH : ${glib.bin}/bin
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
|
||||||
|
--add-flags ${lib.escapeShellArg commandLineArgs}
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
|
{ stdenv, lib, callPackage, fetchurl
|
||||||
|
, isInsiders ? false
|
||||||
|
, commandLineArgs ? ""
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv.hostPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
@ -31,6 +34,7 @@ in
|
|||||||
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
||||||
longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders";
|
longName = "Visual Studio Code" + lib.optionalString isInsiders " - Insiders";
|
||||||
shortName = "Code" + lib.optionalString isInsiders " - Insiders";
|
shortName = "Code" + lib.optionalString isInsiders " - Insiders";
|
||||||
|
inherit commandLineArgs;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
name = "VSCode_${version}_${plat}.${archive_fmt}";
|
name = "VSCode_${version}_${plat}.${archive_fmt}";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, callPackage, fetchurl, nixosTests }:
|
{ lib, stdenv, callPackage, fetchurl, nixosTests, commandLineArgs ? "" }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv.hostPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
@ -25,7 +25,7 @@ let
|
|||||||
sourceRoot = if stdenv.isDarwin then "" else ".";
|
sourceRoot = if stdenv.isDarwin then "" else ".";
|
||||||
in
|
in
|
||||||
callPackage ./generic.nix rec {
|
callPackage ./generic.nix rec {
|
||||||
inherit sourceRoot;
|
inherit sourceRoot commandLineArgs;
|
||||||
|
|
||||||
# Please backport all compatible updates to the stable release.
|
# Please backport all compatible updates to the stable release.
|
||||||
# This is important for the extension ecosystem.
|
# This is important for the extension ecosystem.
|
||||||
|
Loading…
Reference in New Issue
Block a user