1 { lib, fetchFromGitHub, fetchzip, nodejs, stdenvNoCC, testers }:
4 completion = fetchFromGitHub {
6 repo = "yarn-completion";
8 hash = "sha256-z7KPXeYPPRuaEPxgY6YqsLt9n8cSsW3n2FhOzVde1HU=";
11 stdenvNoCC.mkDerivation (finalAttrs: {
16 url = "https://github.com/yarnpkg/yarn/releases/download/v${finalAttrs.version}/yarn-v${finalAttrs.version}.tar.gz";
17 sha256 = "sha256-12wUuWH+kkqxAgVYkyhIYVtexjv8DFP9kLpFLWg+h0o=";
20 buildInputs = [ nodejs ];
23 mkdir -p $out/{bin,libexec/yarn/,share/bash-completion/completions/}
24 cp -R . $out/libexec/yarn
25 ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn
26 ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg
27 ln -s ${completion}/yarn-completion.bash $out/share/bash-completion/completions/yarn.bash
30 passthru.tests = testers.testVersion { package = finalAttrs.finalPackage; };
33 description = "Fast, reliable, and secure dependency management for javascript";
34 homepage = "https://classic.yarnpkg.com/";
35 changelog = "https://github.com/yarnpkg/yarn/blob/v${finalAttrs.version}/CHANGELOG.md";
36 license = licenses.bsd2;
37 maintainers = with maintainers; [ offline screendriver marsam ];
38 platforms = nodejs.meta.platforms;