67 lines
1.2 KiB
Nix
67 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, # VSCodium build deps
|
|
git
|
|
, curl
|
|
, cacert
|
|
, jq
|
|
, nodejs
|
|
, nodePackages
|
|
, yarn
|
|
, python3
|
|
, xcodebuild
|
|
, darwin
|
|
}:
|
|
|
|
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 = "JtEMO9GVez5v7eE23DB2WVIZNMlC7O50gvP5p5l3jkU=";
|
|
};
|
|
|
|
nativeBuildInputs = with darwin.apple_sdk.frameworks; [
|
|
git
|
|
curl
|
|
cacert
|
|
jq
|
|
nodejs
|
|
nodePackages.npm
|
|
yarn
|
|
python3
|
|
xcodebuild
|
|
AppKit
|
|
CoreServices
|
|
Cocoa
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
export HOME=$(mktemp -d)
|
|
. get_repo.sh
|
|
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=arm64 . build.sh
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p "$out/Applications/${longName}.app" "$out/bin"
|
|
cp -r ./VSCode-darwin-arm64/* "$out/Applications/${longName}.app"
|
|
ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${executableName}" "$out/bin/${executableName}"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta.platforms = [ "aarch64-darwin" ];
|
|
}
|