12 completion = fetchFromGitHub {
14 repo = "yarn-completion";
16 hash = "sha256-z7KPXeYPPRuaEPxgY6YqsLt9n8cSsW3n2FhOzVde1HU=";
19 stdenvNoCC.mkDerivation (finalAttrs: {
24 url = "https://github.com/yarnpkg/yarn/releases/download/v${finalAttrs.version}/yarn-v${finalAttrs.version}.tar.gz";
25 sha256 = "sha256-kFa+kmnBerTB7fY/IvfAFy/4LWvrl9lrRHMOUdOZ+Wg=";
28 buildInputs = lib.optionals withNode [ nodejs ];
31 mkdir -p $out/{bin,libexec/yarn/,share/bash-completion/completions/}
32 cp -R . $out/libexec/yarn
33 ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarn
34 ln -s $out/libexec/yarn/bin/yarn.js $out/bin/yarnpkg
35 ln -s ${completion}/yarn-completion.bash $out/share/bash-completion/completions/yarn.bash
39 tests.version = lib.optionalAttrs withNode (testers.testVersion {
40 package = finalAttrs.finalPackage;
43 updateScript = gitUpdater {
44 url = "https://github.com/yarnpkg/yarn.git";
50 description = "Fast, reliable, and secure dependency management for javascript";
51 homepage = "https://classic.yarnpkg.com/";
52 changelog = "https://github.com/yarnpkg/yarn/blob/v${finalAttrs.version}/CHANGELOG.md";
53 license = licenses.bsd2;
54 maintainers = with maintainers; [ offline screendriver marsam ];
55 platforms = platforms.all;