Profpatsch / yarn2nix

Build and deploy node packages with nix from yarn.lock files.
MIT License
85 stars 21 forks source link

feat(nix-lib): initial support for import-from-derivation #30

Closed sternenseemann closed 3 years ago

sternenseemann commented 4 years ago

This pull request contains the original base change of #27 plus a simple test on top of it sanity-checking the README example.

In that test we:

sternenseemann commented 4 years ago

Rebased against master and now using yarn2nix --offline to build the dependency nix expression.

Profpatsch commented 4 years ago

Should we also add callYarnLockNix and callPackageJsonNix here, which are the non-IfD versions of the functions?

Profpatsch commented 4 years ago

Also let’s pull callPackage into these functions I guess, so that you get everything with one call.

Profpatsch commented 4 years ago

Dumping my thoughts about the restructuring of the API (sorry German):

01:06:59 Profpatsch | Also das callPackage können wir glaub eh reinziehen.
01:07:18 Profpatsch | callYarnLock
01:07:26 Profpatsch | callYarnLockNix
01:07:35 Profpatsch | callPackageJson
01:07:40 Profpatsch | callPackageJsonNix
01:07:56 Profpatsch | dann ist die ifd-Funktion (mit besserer usability) die kürzere
01:08:35 Profpatsch | Und buildYarnPackage als toplevel-Hilfsfunktion
01:08:51 Profpatsch | Dann ist das schonmal vorbereitet für buildNpmPackage
01:08:57 Profpatsch | Wenn wir npm lockfiles einbauen
01:09:11 Profpatsch | Und buildYarnPackageNix
01:09:25 Profpatsch | Macht das Sinn?
01:10:02 Profpatsch | Dann gibt es später auch callNpmLock und callNpmLockNix
01:10:16 Profpatsch | Und alle generieren das gleiche Format
01:10:32 Profpatsch | Der ultimative Javascript builder quasi
sternenseemann commented 4 years ago

Should we also add callYarnLockNix and callPackageJsonNix here, which are the non-IfD versions of the functions?

Wouldn't they just be aliases to callPackage?