Commit Graph

20 Commits

Author SHA1 Message Date
Sumner Evans
093a003639
yarn2nix: allow setting doDist by calling packages 2022-05-31 09:52:09 -06:00
Robert Hensing
200175a701 config.allowAliases: Define as option
This simplifies usages and makes the default value consistent.

In a few cases, the default value was interpreted to be `false`,
but this is useless, because virtually nobody will explicitly
set `allowAliases = true;`.
2022-04-01 11:33:10 +02:00
Silvan Mosberger
c7b52869d8
Merge pull request #128119 from Simspace/yarn2nix-preserve-resolutions
yarn2nix: preserve top-level package.json resolutions field in workspace
2022-03-24 05:00:51 +01:00
Richard Wallace
9801e6e53d yarn2nix: preserve top-level package.json resolutions field in workspace
The `package.json` produced when building node_modules for a workspace
ignores the `resolutions` from the project `package.json`. This results
in dependencies being resolved in a way that conflicts with the
`yarn.lock` file. To fix this, we need to preserve the `resolutions`.
2022-03-23 14:34:01 -07:00
Thomas Baggaley
e3a60c19f8 yarn2nix: support new yarn workspace json 2022-03-05 00:27:42 -05:00
Jan Tojnar
ecb6f035e6 yarn2nix: Add support for nativeBuildInputs in pkgConfig 2022-01-28 17:41:25 +01:00
Shamrock Lee
60950f739e lib/meta: add getLicenseFromSpdxId function
Move function spdxLicense, internally used in yarn2nix
to lib/meta.nix, and
rename to getLicenseFromSpdxId

A similar function is implemented in poetry2nix,
but the one originally in yarn2nix seems beter.
since it falls back to an license-like attrset
for mismatched case
instead of a plain string
2021-12-02 18:33:48 +08:00
Yureka
1d525f51fb yarn2nix: add nix-prefetch-git to PATH 2021-10-31 14:37:51 +01:00
Yureka
84e02be598 fetchYarnDeps, mkYarnModules: verify the FOD hash is up-to-date 2021-10-20 11:39:16 +02:00
Yureka
cf6f772676 mkYarnModules: allow passing custom offlineCache 2021-10-20 11:39:16 +02:00
Felix Buehler
6ee7f33833 yarn2nix: replace simple mkDerivation with runCommandLocal 2021-08-22 19:35:42 +09:00
Felix Buehler
43b5d5ae70 yarn2nix: deprecate phases 2021-08-16 22:37:41 +02:00
Sandro
476f69bc5e
Merge pull request #101521 from egasimus/patch-2 2021-06-09 12:54:50 +02:00
Maximilian Bosch
fea2b25c74 yarn2nix: set name to ${pname}-${version} by default 2021-06-02 19:21:31 +09:00
Gabriel Ebner
b184f8f883 mkYarnPackage: allow overriding version 2020-12-13 13:42:56 +01:00
Adam Avramov
4ef1e5b8de yarn2nix: expose yarnPostBuild
The way I see it, there's no point in the argument being there if it can't be used.
Right now its lack currently prevents a workaround for an issue I can't wrap my head around - first encountered [here](https://logs.nix.samueldr.com/nixos-dev/2019-08-28#2532857;).
2020-12-08 23:54:40 +01:00
Silvan Mosberger
75ee18766a
yarn2nix: Don't pass yarnNix to mkDerivation (#92856)
The generated yarnNix file doesn't need to be part of the mkDerivation.
And doing so prevents other platforms from reproducibly instantiating
it. With this change you can e.g. do

  darwinPkgs.yarn2nix.mkYarnPackage {
    # ...
    yarnNix = pkgs.yarn2nix.mkYarnNix {
      yarnLock = ./yarn.lock;
    };
  }

Which is a darwin derivation, but can still be instantiated reproducibly on Linux.
2020-07-10 16:24:03 +00:00
Milan
ed90e59fc2 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)
2019-11-22 14:27:11 +00:00
volth
08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
WilliButz
f748b501e8
yarn2nix-moretea: init at 2019-04-10 2019-07-25 17:15:00 +02:00