You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a package for a PHP app that uses composer for managing php dependencies and npm for managing javascript dependencies. I'm able to use either node2nix or this repo to independently to have nix-build build either the PHP or the js dependencies, but I haven't been able to find any way to compose the two to build a package with which derives both the javascript and php dependencies at the same time.
Is there a way to use the derivations from the two x2nix programs at the same time? (I'm fairly new to nix so I may be missing something obvious.)
The text was updated successfully, but these errors were encountered:
For posterity, here's the general contour of what I did when I had this use case:
letnpmPackage=(callPackage./deps/node-composition.nix{}).package.override{postInstall='' npm run build '';};phpPackage=callPackage./deps/php-composition.nix{noDev=true;};in# Compose the npm and php packages togetherrunCommand"package-with-js-and-php-deps"{}'' mkdir $out${rsync}/bin/rsync -a ${npmPackage}/lib/node_modules/package/ ${phpPackage}/ $out ''
At the moment this is not possible without any hacks/workarounds. However, I have some future plans to also allow substituting dependencies before npm/composer is invoked. I'm already working on it for a while, but it is going to take time -- it requires some major re-architecting to make this happen.
I'm trying to build a package for a PHP app that uses composer for managing php dependencies and npm for managing javascript dependencies. I'm able to use either
node2nix
or this repo to independently to havenix-build
build either the PHP or the js dependencies, but I haven't been able to find any way to compose the two to build a package with which derives both the javascript and php dependencies at the same time.Is there a way to use the derivations from the two
x2nix
programs at the same time? (I'm fairly new to nix so I may be missing something obvious.)The text was updated successfully, but these errors were encountered: