-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildYarnPackage: init #210814
base: master
Are you sure you want to change the base?
buildYarnPackage: init #210814
Conversation
4885310
to
b889893
Compare
Not sure how helpful/relevant this is, but i ran into this issue while playing around with this PR: { lib
, stdenv
, buildYarnPackage
, fetchFromGitHub
, pkgs
}:
buildYarnPackage rec {
pname = "hydrogen-web";
version = "0.3.6";
src = fetchFromGitHub {
owner = "vector-im";
repo = "hydrogen-web";
rev = "refs/tags/v${version}";
hash = "sha256-pWYIXzObuTMpSW0UsbaO9CSOu0tN96wj8XXvglxCZrI=";
};
yarnDepsHash = "sha256-+KcMLjM9q/RHgV3XhFAH/tGSZ3xpHJ08JHS1L09o1MY=";
preInstall = ''
set -x # debug
'';
} results in
which likely came from here. The url in question has been downloaded into |
Try |
It removes the warnings
|
Got it, thanks. I'll take a look at this when I get back to this PR (have a fix in mind but need to test it) -- thank you for the information! I'll ping you once I push a fix :) |
Is there anything blocking this from being merged? Would be super helpful. |
It needs some updates, but I'm hoping to get to it soon. I'll reply later with specific details of what is needed just so it's transparent |
Hi! Just wanted to ask if there have been any updates for this as it would be helpful. |
Description of changes
buildYarnPackage
builds off of the work that Yureka did onfetchYarnDeps
, as well as my work onbuildNpmPackage
, providing a common interface and set of hooks for Node-based projects. This was the main thing preventing towards the coordinated effort to migrate away from the node2nix-generatednodePackages
set, as a lot of packages use Yarn.As for why this is better than the current Yarn tooling in Nixpkgs:
mkYarnPackage
tries to do way too much by comparison, leading to breakages. This also allows us to get rid of a lot of the code duplication surrounding Yarn packages that don't currently usemkYarnPackage
, as they all contain the same set of commands (all of which are ran in the new Yarn config hook).The main blocker is docs -- these were kind of cobbled together. I'm not really sure how to handle the whole "only
yarn install
gets its own set of flags, all the others arenpm...
" thing, maybe I should just... explicitly state it? Is there a better way to explain it other than just saying a) what the gotcha is, and b) why it's done? Everything else should be fine, and ready to test.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes