Closed sternenseemann closed 3 years ago
Rebased against master
and now using yarn2nix --offline
to build the dependency nix expression.
Should we also add callYarnLockNix
and callPackageJsonNix
here, which are the non-IfD versions of the functions?
Also let’s pull callPackage
into these functions I guess, so that you get everything with one call.
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
Should we also add
callYarnLockNix
andcallPackageJsonNix
here, which are the non-IfD versions of the functions?
Wouldn't they just be aliases to callPackage
?
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:
yarn.lock
file containing some common dependencies and generate annpm-deps.nix
filepackage.json
file and generate antemplate.nix
file (ornpm-package.nix
).buildNodeDeps
as well ascallTemplate
andbuildNodePackage
to build the resulting package.