Skip to content

Instantly share code, notes, and snippets.

@JLarky
Last active April 4, 2020 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JLarky/09a8622dad083573222173abb2e17238 to your computer and use it in GitHub Desktop.
Save JLarky/09a8622dad083573222173abb2e17238 to your computer and use it in GitHub Desktop.
{ stdenv, fetchurl, unzip }:
# this is more stupid version of https://github.com/denoland/deno_install/blob/master/install.sh
# Run this to get last version:
# curl -sSf https://github.com/denoland/deno/releases | grep denoland/deno/releases/downloa | grep -e x86_64-apple-darwin -e x86_64-unknown-linux-gnu | head -2
# based on https://qiita.com/kimagure/items/de2a4ff45dd8fe8be4b1
stdenv.mkDerivation rec {
name = "deno-${version}";
version = "v0.38.0";
src = fetchurl ({
x86_64-linux = {
url = "https://github.com/denoland/deno/releases/download/${version}/deno-x86_64-unknown-linux-gnu.zip";
sha256 = "04bcrb7v6hj1rihh4hspwkjddab4xhw8rcrc8s199l12f0i5zpp7";
};
x86_64-darwin = {
url = "https://github.com/denoland/deno/releases/download/${version}/deno-x86_64-apple-darwin.zip";
sha256 = "04fyslxk09y21sv6ypbm8kq79yylkkc8qwd3l0b4mbgszkdvrzdr";
};
}).${stdenv.hostPlatform.system};
buildInputs = [ unzip ];
## unzip deno into proper path
unpackPhase = ''
mkdir -p $out/bin
unzip $src -d $out/bin
'';
## don't run install, since the binary is already there
dontInstall = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment