From bb0d0a366b58f8922a055cbb2d4a7e2d318bfefd Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Sat, 14 Jan 2017 20:49:57 +0100 Subject: [PATCH] yarn: init at 0.18.1 --- pkgs/development/tools/yarn/default.nix | 26 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/tools/yarn/default.nix diff --git a/pkgs/development/tools/yarn/default.nix b/pkgs/development/tools/yarn/default.nix new file mode 100644 index 000000000000..2276eb04e6fa --- /dev/null +++ b/pkgs/development/tools/yarn/default.nix @@ -0,0 +1,26 @@ +{ stdenv, nodejs, fetchzip, makeWrapper }: + +stdenv.mkDerivation rec { + name = "yarn-${version}"; + version = "0.18.1"; + + src = fetchzip { + url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz"; + sha256 = "1jkgd2d0n78jw66a0v3cgawcc9qvzjy1zp8c1wzfqf0hl5wrcv9q"; + }; + + buildInputs = [makeWrapper nodejs]; + + installPhase = '' + mkdir -p $out/{bin,libexec/yarn/} + cp -R . $out/libexec/yarn + makeWrapper $out/libexec/yarn/bin/yarn.js $out/bin/yarn + ''; + + meta = with stdenv.lib; { + homepage = https://yarnpkg.com/; + description = "Fast, reliable, and secure dependency management for javascript"; + license = licenses.bsd2; + maintainers = [ maintainers.offline ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 465a872aa2bb..02e1a2a61507 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4462,6 +4462,8 @@ in xwinmosaic = callPackage ../tools/X11/xwinmosaic {}; + yarn = callPackage ../development/tools/yarn { }; + yank = callPackage ../tools/misc/yank { }; yaml-merge = callPackage ../tools/text/yaml-merge { };