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
Patchwork #35334
Patchwork #35334
Conversation
Sorry, didn't mean to ping you zimba. |
Smilies aren't working yet... will have to strace to see where it's looking for them or maybe it's a font thing. |
|
Argh, I'm always on nix 1.12 so I didn't notice that. Will try to come up with a fix. |
Should be fixed now. |
I love you. This works for me. |
|
Unfortunately the derivation can't be built using npm2nix, so I had to make a yarn.lock file. I could in theory host it somewhere else and download it, but not sure what a good place for that would be. I can split up electron update into a separate commit. I don't think it'll cause much problems. |
Same PR is fine, just good practice and makes it more manageable (to cherrypick, revert, ...) If the file can be fetched without IFD, then definitely let's find a different home for it. Otherwise every single channel updates for forever will include a copy of it! Haha |
repo = "yarn2nix"; | ||
rev = "d6e05a521bd92b2647bb7e853363d234f21b2cfd"; | ||
sha256 = "1nvpii9p41vrb6zvr8rqcvmycrl6lnzzaif85qj1aavizncgb4wy"; | ||
}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last time I checked import from derivation was not allowed on Hydra, we would have import yarn2nix into nixpkgs first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to find a good location for it... I'll start working on a separate PR. Just hope @moretea is OK with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm quite sure he's OK with it. The only reason not to include it is that a new yarn2nix nix emerged that is even more powerful: https://github.com/Profpatsch/yarn2nix
nodeHeaders = fetchurl { | ||
url = "https://nodejs.org/download/release/v${nodejs.version}/node-v${nodejs.version}-headers.tar.gz"; | ||
sha256 = "1993kcghzr56zmw5sdj8wr8c42mna25806bcjknfxnh62zl4hwpg"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm doing the exact same thing in another project and it breaks every time I update nixpkgs and the nodejs has been bumped. I think the nodejs package should export the headers in another output like nodejs.dev
Can we please get this ready before the actual nixos 18.03 release? |
This depends entirely on #35340 making it in. |
@manveru can you rebase on master? |
This is the same error we were seeing in yarn2nix |
I'm not sure how to solve that then. Really would like to avoid adding the package.json and yarn.lock as well to nixpkgs... |
I don't think we have a choice |
Sounds like "without causing IFD problems" is indeed not possible, yes? Still 4K is heavy, not sure how important this is to everyone. It certainly would be a problem if we had many such files... |
So I finally added the yarn.lock and generated yarn.nix to this PR. I think this is a really good example to show that for some derivations, import-from-derivation (IFD) can be very valuable. I'm not sure what needs to be done to make this an option though. If this is not merged you can still get it from my nixpkgs fork, I'll keep the branch around, but probably won't be using Patchwork much myself, so don't expect frequent updates. |
Thanks for providing this patch! I want patchwork in nixpkgs, but I don't want this huge file in nixpkgs. This is definitively not the path to take for packages like this and we should look for a better solution how to package things like this (in the general case for nixpkgs, not only in this case). I would say No! don't merge this. |
I talked with @globin and @domenkozar yesterday, and they think we could have a combined yarn-packages.nix like we do for other languages. I think it's possible to do that, but due to the nature of NPM, it will have a lot more entries. The benefit is that we can probably share quite some dependencies between different electron apps. I'll try my hand at packaging #32516 as well and see how much they have in common. |
Any progress? |
1 similar comment
Any progress? |
I believe that electron apps are (too) high hanging fruits for nixpkgs with the current amount of humans working on it. I propose to loosen the sandbox model for such apps, meaning that you can run "npm install" / "yarn install" prior to the Package output:
All deps reside in These packages would be second class with no guarantees. |
Why would node2nix not work here? Patchwork provides a |
(triage) If I read correctly, this is more or less blocked on Hydra turning on IFD? If so, maybe tag it “WIP” or something? |
For the curious: what is IFD? |
"Import-from-derivation": |
Any progress? |
@c0bw3b it's fine, not using it myself anyway. |
Motivation for this change
Closes #31052 and #24784
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)