Created
June 8, 2022 11:19
-
-
Save framp/29e883d2385ab5365f7df93587faf8f1 to your computer and use it in GitHub Desktop.
use with (pkgs.callPackage ./custom/volta.nix { }); credits https://github.com/NixOS/nixpkgs/pull/130552
This file contains 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
{ lib, fetchFromGitHub, rustPlatform, installShellFiles }: | |
rustPlatform.buildRustPackage rec { | |
pname = "volta"; | |
version = "1.0.8"; | |
src = fetchFromGitHub { | |
owner = "volta-cli"; | |
repo = pname; | |
rev = "v${version}"; | |
sha256 = "sha256-qffsfGw40z7K3kWNV4F2qigX0/48+LhwvTZPzt3DpLk="; | |
}; | |
nativeBuildInputs = [ installShellFiles ]; | |
cargoSha256 = "sha256-1w9ktPc/GvfU+tlC0oJ5HhxkeVICYBAKwpTVeUxYcS0="; | |
postInstall = '' | |
installShellCompletion --cmd volta \ | |
--bash <($out/bin/volta completions bash) \ | |
--fish <($out/bin/volta completions fish) \ | |
--zsh <($out/bin/volta completions zsh) | |
''; | |
meta = with lib; { | |
description = "JavaScript toolchain manager for reproducible environments"; | |
homepage = "https://volta.sh/"; | |
license = lib.licenses.bsd2; | |
maintainers = with maintainers; [ kidonng ]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment