nixpkgs/pkgs/applications/editors/vscode/vscodium.nix
Morgan Wolfe 8769a90f90
vscode: disable ripgrep patching on macOS
useVSCodeRipgrep = false interferes with macOS 13's notarization enforcement
and doesn't allow the app to start. Setting it to stdenv.isDarwin by default
fixes the package for general use while preserving the option to patch ripgrep
on older versions of macOS if required by someone's particular use case.
2023-05-29 13:24:02 -07:00

68 lines
2.5 KiB
Nix

{ lib, stdenv, callPackage, fetchurl, nixosTests, commandLineArgs ? "", useVSCodeRipgrep ? stdenv.isDarwin }:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
plat = {
x86_64-linux = "linux-x64";
x86_64-darwin = "darwin-x64";
aarch64-linux = "linux-arm64";
aarch64-darwin = "darwin-arm64";
armv7l-linux = "linux-armhf";
}.${system} or throwSystem;
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "0ymgy0xisfxqrrmwpy0ga2rhlzhxqq39ppjfawxaf0dfdnkhgkgr";
x86_64-darwin = "1q5fg7cm8d4iwvx8b589aqby5vw1b66y85dxgrq6sapz9cg2pvhz";
aarch64-linux = "13vdqbhap9qd96y5n0immlwr61v8f7yvbwc9m0qas06f30b71f3z";
aarch64-darwin = "01dc7hv13ngr0xv2cmd2likmdc2gz0jbmgashmkm12gdrjp4q968";
}.${system} or throwSystem;
sourceRoot = if stdenv.isDarwin then "" else ".";
in
callPackage ./generic.nix rec {
inherit sourceRoot commandLineArgs useVSCodeRipgrep;
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.78.2.23132";
pname = "vscodium";
executableName = "codium";
longName = "VSCodium";
shortName = "vscodium";
src = fetchurl {
url = "https://github.com/VSCodium/vscodium/releases/download/${version}/VSCodium-${plat}-${version}.${archive_fmt}";
inherit sha256;
};
tests = nixosTests.vscodium;
updateScript = ./update-vscodium.sh;
meta = with lib; {
description = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS (VS Code without MS branding/telemetry/licensing)
'';
longDescription = ''
Open source source code editor developed by Microsoft for Windows,
Linux and macOS. It includes support for debugging, embedded Git
control, syntax highlighting, intelligent code completion, snippets,
and code refactoring. It is also customizable, so users can change the
editor's theme, keyboard shortcuts, and preferences
'';
homepage = "https://github.com/VSCodium/vscodium";
downloadPage = "https://github.com/VSCodium/vscodium/releases";
license = licenses.mit;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ synthetica turion bobby285271 ];
mainProgram = "codium";
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" "armv7l-linux" ];
};
}