Skip to content

mkYarnPackage: run yarn --offline build in buildPhase? Also, avoid IFD when packageJSON = src + "/package.json" #296856

Closed
@doronbehar

Description

Today I packaged vim-language-server with mkYarnPackage, first time I ever used this Nix function. I noticed after reading the source code and the docs, that there is no buildPhase defined by default, whereas buildNpmPackage runs npm run build by default.

For mkYarnPackage, the default buildPhase I'd expect it to run is:

yarn --offline build

According to a simple git grep survey I did with:

git grep -l -E 'yarn( --offline| run)* build' $(git grep -l -- 'mkYarnPackage' | grep -v yarn2nix/default.nix | grep -v doc/ | grep -v all-packages.nix) | wc -l

There are 37 files using mkYarnPackage. 21 of them are running some form of yarn build, and hence probably could have package these packages with a better experience with that default buildPhase.

ccing people I found with git blame who touched mkYarnPackage before: @happysalada @WilliButz @yu-re-ka

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions