Add initial vscodium-m1

work
mat ess 2022-04-21 18:15:52 -04:00
parent 95cc5d6976
commit d6f77dca45
3 changed files with 33 additions and 1 deletions

View File

@ -161,6 +161,7 @@
system = "x86_64-darwin";
inherit (nixpkgsConfig) config;
};
vscodium-m1 = import ./pkgs/vscodium-m1.nix { };
};
};

View File

@ -66,7 +66,7 @@
# vscode
vscode = {
enable = true;
package = pkgs.vscodium;
package = pkgs.vscodium-m1;
};
};
# }}}

31
pkgs/vscodium-m1.nix Normal file
View File

@ -0,0 +1,31 @@
{ lib, stdenv }:
stdenv.mkDerivation rec {
pname = "vscodium";
version = "1.66.2";
executableName = "codium";
longName = "VSCodium";
shortName = "vscodium";
src = fetchurl {
url = "https://github.com/VSCodium/vscodium/archive/refs/tags/${version}.tar.gz";
sha256 = "";
};
buildPhase = ''
rm -rf VSCode*
rm -rf vscode
. get_repo.sh
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=arm64 . build.sh
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications/${longName}.app" "$out/bin"
cp -r ./* "$out/Applications/${longName}.app"
ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${executableName}" "$out/bin/${executableName}"
'';
}