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

yarn2nix: successfully build packages with "@" and "/" in their name #41001

Closed
wants to merge 1 commit into from

Conversation

nicknovitski
Copy link
Contributor

Motivation for this change

My workplace releases "scoped" node packages, whose names can be things like @scope/foo. It's possible to override the name of the package's derivation, but not that of the internal "modules" derivation the function creates, which will get an invalid name like @scope/foo-modules-0.0.1.

I coped node2nix's pattern of replacing the characters with _at_ and _slash_.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@nicknovitski
Copy link
Contributor Author

I assume this is better handled by nix-community/yarn2nix@44e16c6?

@nicknovitski
Copy link
Contributor Author

I adapted that change with what I believe to be a portable regex.

@xeji
Copy link
Contributor

xeji commented Jun 18, 2018

cc @manveru @zimbatm

@zimbatm
Copy link
Member

zimbatm commented Jun 18, 2018

okay, this is not maintainable. We now have PRs submitted against nixpkgs and yarn2nix for the same code and it's starting to diverge.

All PRs should be submitted to upstream. Updates to nixpkgs should only happen in the form: updated yarn2nix from

@nicknovitski
Copy link
Contributor Author

Good idea!

@nicknovitski nicknovitski deleted the yarn2nix-names branch July 11, 2018 02:42
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.

None yet

4 participants