From ed90e59fc293c412c2a4f51024932a4245384549 Mon Sep 17 00:00:00 2001 From: Milan Date: Fri, 22 Nov 2019 15:27:11 +0100 Subject: [PATCH] yarn2nix-moretea: v1.0.0-36-g3f2dbb0 -> v1.0.0-39-g9e7279e (#73911) Includes the following upstream commits: - Fix for package.json without a version (moretea/yarn2nix#113) - Don't access package.json via filtered src (moretea/yarn2nix#115) - remove redundant rec (moretea/yarn2nix#119) --- pkgs/development/tools/yarn2nix-moretea/fetch-source.nix | 4 ++-- .../tools/yarn2nix-moretea/yarn2nix/default.nix | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/yarn2nix-moretea/fetch-source.nix b/pkgs/development/tools/yarn2nix-moretea/fetch-source.nix index b15b40c4a043..fc9b149887a5 100644 --- a/pkgs/development/tools/yarn2nix-moretea/fetch-source.nix +++ b/pkgs/development/tools/yarn2nix-moretea/fetch-source.nix @@ -5,6 +5,6 @@ fetchFromGitHub { owner = "moretea"; repo = "yarn2nix"; - rev = "3f2dbb08724bf8841609f932bfe1d61a78277232"; - sha256 = "142av7dwviapsnahgj8r6779gs2zr17achzhr8b97s0hsl08dcl2"; + rev = "9e7279edde2a4e0f5ec04c53f5cd64440a27a1ae"; + sha256 = "0zz2lrwn3y3rb8gzaiwxgz02dvy3s552zc70zvfqc0zh5dhydgn7"; } diff --git a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix index f5989390c4b0..22032e145d3f 100644 --- a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix +++ b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix @@ -238,7 +238,7 @@ in rec { package = lib.importJSON packageJSON; pname = package.name; safeName = reformatPackageName pname; - version = package.version; + version = package.version or attrs.version; baseName = unlessNull name "${safeName}-${version}"; workspaceDependenciesTransitive = lib.unique ( @@ -389,6 +389,11 @@ in rec { # yarn2nix is the only package that requires the yarnNix option. # All the other projects can auto-generate that file. yarnNix = ./yarn.nix; + + # Using the filter above and importing package.json from the filtered + # source results in an error in restricted mode. To circumvent this, + # we import package.json from the unfiltered source + packageJSON = ./package.json; yarnFlags = defaultYarnFlags ++ ["--production=true"];