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

Projects
None yet
5 participants
@pacien
Copy link
Contributor

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.

riot-desktop: use own yarn2nix
github ref: closes #58593
@flokli

This comment has been minimized.

Copy link
Contributor

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 :-)

@flokli
Copy link
Contributor

left a comment

see comment above.

@pacien

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Mar 31, 2019

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Apr 2, 2019

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

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

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.

@flokli

flokli approved these changes Apr 12, 2019

@worldofpeace worldofpeace merged commit 3bdf5b5 into NixOS:master Apr 12, 2019

13 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
riot-desktop on aarch64-linux Success
Details
riot-desktop on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.