push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
buildPackages,
writableTmpDirAsHomeHook,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "volta";
version = "2.0.2";
src = fetchFromGitHub {
owner = "volta-cli";
repo = "volta";
tag = "v${version}";
hash = "sha256-ZI+3/Xbkg/JaZMLhrJEjaSwjs44fOaiRReM2DUTnkkc=";
};
cargoHash = "sha256-xlqsubkaX2A6d5MIcGf9E0b11Gzneksgku0jvW+UdbE=";
buildInputs = [ installShellFiles ];
postInstall =
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
installShellCompletion --cmd volta \
--bash <(${emulator} $out/bin/volta completions bash) \
--fish <(${emulator} $out/bin/volta completions fish) \
--zsh <(${emulator} $out/bin/volta completions zsh)
'';
nativeCheckInputs = [
writableTmpDirAsHomeHook
];
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
# Tries to create /var/empty/.volta as $HOME is not writable
doInstallCheck = !stdenv.hostPlatform.isDarwin;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Hassle-Free JavaScript Tool Manager";
longDescription = ''
With Volta, you can select a Node engine once and then stop worrying
about it. You can switch between projects and stop having to manually
switch between Nodes. You can install npm package binaries in your
toolchain without having to periodically reinstall them or figure out why
theyve stopped working.
Note: Volta cannot be used on NixOS out of the box because it downloads
Node binaries that assume shared libraries are in FHS standard locations.
'';
homepage = "https://volta.sh/";
changelog = "https://github.com/volta-cli/volta/blob/main/RELEASES.md";
license = with lib.licenses; [ bsd2 ];
maintainers = with lib.maintainers; [ fbrs ];
mainProgram = "volta";
};
}