Created
August 28, 2022 05:34
-
-
Save MarcoPolo/66e2c4a317cbf1bd8d64a8e30d9cf854 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgs.stdenv.mkDerivation | |
{ | |
name = "code-server"; | |
src = pkgs.fetchurl | |
( | |
let | |
INSTALL_ARCH = "x86_64"; | |
INSTALL_TARGET = "unknown-linux-gnu"; | |
in | |
{ | |
url = "https://aka.ms/vscode-server-launcher/${INSTALL_ARCH}-${INSTALL_TARGET}"; | |
# sha256 = pkgs.lib.fakeSha256; | |
sha256 = "sha256-vwiDIpdV4uq56W5GU3vG6/Q5vwYl4WZUqOMI1aiSRIA="; | |
} | |
); | |
dontUnpack = true; | |
unpackPhase = '' | |
echo "UNPACKED" | |
''; | |
buildPhase = '' | |
mkdir -p $out/bin | |
cp $src $out/bin/code-server | |
chmod a+x $out/bin/code-server | |
''; | |
installPhase = '' | |
echo "Installed" | |
''; | |
buildInputs = [ | |
pkgs.glibc | |
pkgs.libcxx.dev | |
pkgs.stdenv.cc.cc.lib | |
]; | |
# Required for compilation | |
nativeBuildInputs = [ | |
pkgs.autoPatchelfHook # Automatically setup the loader, and do the magic | |
pkgs.glibc | |
]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment