Skip to content
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

riot-desktop: use own yarn2nix #58597

Merged
merged 1 commit into from Apr 12, 2019

Conversation

pacien
Copy link
Contributor

@pacien pacien commented Mar 30, 2019

Motivation for this change

Use our own copy of yarn2nix as that package is being removed (#58424).

github ref: closes #58593

CC: @worldofpeace

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@flokli
Copy link
Contributor

flokli commented Mar 30, 2019

I don't think vendoring moretea/yarn2nix this is the right approach.

Can't you just use https://github.com/Profpatsch/yarn2nix and the required dependencies in a nix expression?

I guess @Profpatsch will gladly help in case you encounter issues with using that :-)

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment above.

@pacien
Copy link
Contributor Author

pacien commented Mar 30, 2019

@flokli wrote:

I don't think vendoring moretea/yarn2nix this is the right approach.

Can't you just use https://github.com/Profpatsch/yarn2nix and the required dependencies in a nix expression?

I guess @Profpatsch will gladly help in case you encounter issues with using that :-)

Wouldn't it be the same?

From https://github.com/Profpatsch/yarn2nix#using-the-generated-nix-files-to-build-a-project:

  nixLib = pkgs.callPackage /path/to/yarn2nix/nix-lib {
    # WARNING (TODO): for now you need to use this checked out yarn2nix
    # because the upstream package (in haskellPackages) might have
    # broken dependencies (yarn-lock and yarn2nix are not in stackage)

@worldofpeace
Copy link
Contributor

Thanks @pacien for following up so quickly.

Wouldn't it be the same?

From https://github.com/Profpatsch/yarn2nix#using-the-generated-nix-files-to-build-a-project:

Yeah that sounds identical to what's done here. Though I'm not familiar with these tools, so my opinion won't be influential.

@Profpatsch
Copy link
Member

Profpatsch commented Mar 31, 2019

Yeah, it’s essentially the same. If yarn2nix already works for you, vendoring might be the best solution for now.

I’m not exactly sure why nomeata’s version was pulled from nixpkgs, but I could think about upstreaming my library to nixpkgs & make it beta. Next problem: I use hnix which is regularly broken sadly :(

@Profpatsch Profpatsch closed this Mar 31, 2019
@Profpatsch Profpatsch reopened this Mar 31, 2019
@pacien
Copy link
Contributor Author

pacien commented Mar 31, 2019

@Profpatsch wrote:

[…] I could think about upstreaming my library to nixpkgs & make it beta. Next problem: I use hnix which is regularly broken sadly :(

If that's not possible, I think it would be very nice to have at least a common yarn2nix/nix-lib somewhere in nixpkgs. This would help a lot on its own.

@Profpatsch
Copy link
Member

yarn2nix/nix-lib somewhere in nixpkgs

At least for my implementation, the library is bound to the version of the tool (because changes normally propagate though to the library). Bear in mind that nomeata/yarn2nix and Profpatsch/yarn2nix only share their name, but are not compatible in any way.

@worldofpeace
Copy link
Contributor

So I'm not seeing anything raised that @pacien can make an action on, so I'm partial to this being merged.

If I don't get a counterargument in a couple of days I will merge this.

@worldofpeace worldofpeace merged commit 3bdf5b5 into NixOS:master Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

riot-desktop uses mkYarnPackage
5 participants