Skip to content

Instantly share code, notes, and snippets.

@msteen
Last active April 7, 2020 14:35
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 msteen/0c96377b564ba72b0c4f961d6ea8c42e to your computer and use it in GitHub Desktop.
Save msteen/0c96377b564ba72b0c4f961d6ea8c42e to your computer and use it in GitHub Desktop.
{ stdenv, fetchFromGitHub, makeWrapper, installShellFiles }:
stdenv.mkDerivation rec {
pname = "asdf-vm";
version = "0.7.8";
src = fetchFromGitHub {
owner = "asdf-vm";
repo = "asdf";
rev = "v${version}";
sha256 = "0cr9mnj9fy5riwn6wf4qmdqnjm8n3yxya5a4s4v5qq2wsmpclqc1";
};
nativeBuildInputs = [ makeWrapper installShellFiles ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
lib=$out/lib/${pname}
mkdir -p $out/bin $lib
cp -rt $lib LICENSE VERSION Vagrantfile asdf.fish asdf.sh bin defaults help.txt lib
makeWrapper $lib/bin/asdf $out/bin/asdf
installShellCompletion --bash completions/asdf.bash
installShellCompletion --fish completions/asdf.fish
installShellCompletion --zsh completions/_asdf
'';
meta = with stdenv.lib; {
description = "Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more";
homepage = "https://asdf-vm.com";
license = licenses.mit;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment