clj2nix icon indicating copy to clipboard operation
clj2nix copied to clipboard

the '$' character is invalid.

Open PlumpMath opened this issue 3 years ago • 12 comments

The path name 'org_openjfx_javafx-base$mac-14.jar' is invalid: the '$' character is invalid. Path names are alphanumeric and can include the symbols +-._?= and must not begin with a period. Note: If 'org_openjfx_javafx-base$mac-14.jar' is a source file and you cannot rename it on disk, builtins.path { name = ... } can be used to give it an alternative name.

CLJFX = (import ~/cljfx/deps.nix { inherit pkgs; }).makeClasspaths {};

install CLJFX~ I can't. deps.edn is https://github.com/cljfx/cljfx

When I checked the .m2 folder, the received file name is like this. org.openjfx/javafx-base-14-mac.jar

Thanks

PlumpMath avatar Nov 13 '20 01:11 PlumpMath

thanks for the reproduction example. This is an old nemesis, I think there's time to fix this. The problem is that the dollar is maven package scope, and the fetchMavenArtifact isn't equiped to handle this. This needs to be added. I'll have a go at this.

hlolli avatar Nov 13 '20 22:11 hlolli

So I made a PR on nixpkgs, you can overlay your fetchMavenArtifact with my changes, crossing fingers it gets accepted. https://github.com/NixOS/nixpkgs/pull/103755

hlolli avatar Nov 14 '20 00:11 hlolli

To connect back to here, I made a comment and suggestion to the nixpkgs ticket: https://github.com/NixOS/nixpkgs/pull/103755#issuecomment-735242583

I think the correct approach would be to go with my suggested patch and then update this package to support converting the artifacts with $ to the appropriate call to fetchMavenArtifact.

Also I think after we resolve this, we can ping some of the maintainers in order to get some attention. As well as perhaps posting it to the PRs ready for review thread on NixOS discourse: https://discourse.nixos.org/t/prs-ready-for-review/3032/390

terlar avatar Nov 29 '20 15:11 terlar

A lot on my table atm, I read your comment and it makes total sense your solution. I will modify and follow up today or tomorrow, thank you!

hlolli avatar Nov 30 '20 09:11 hlolli

Thank you, no worries, take your time :smile_cat:

terlar avatar Nov 30 '20 13:11 terlar

Sorry ㅎ.ㅎ g.g;; thanks thanks. I'm sorry that everyone bothers me because of me. The beginning of this is my responsibility. ㅎ.ㅎ Actually, I uploaded it because I wanted to re-install the jar on nix rather than cljfx for work..ㅍㅎ. After completing this reproduction test and requesting it, I immediately turned my attention to the frontend web for works... but now I am trying to install it again. Everyone take care of their health and take it slow. Thanks.

PlumpMath avatar Nov 30 '20 19:11 PlumpMath

I posted an issue about this a while back https://github.com/hlolli/clj2nix/issues/6

samrose avatar Dec 05 '20 02:12 samrose

@samrose yes I remember, sorry for not replying quickly enough.

hlolli avatar Dec 05 '20 17:12 hlolli

nixpkgs change has now been merged :)

terlar avatar Dec 06 '20 09:12 terlar

@hlolli no worries. I thought maybe I was raising a white elephant issue, so I closed it. (it definitely had the problems described, but I thought maybe I was missing some workaround)

samrose avatar Dec 06 '20 13:12 samrose

since https://github.com/NixOS/nixpkgs/pull/103755 is merged now, anything stopping this from being updated to pass classifier correctly? @hlolli do you have a branch somewhere I can depend on for that?

glittershark avatar Jan 04 '21 02:01 glittershark

@glittershark blast from the past here. But do you remember what you ment by passing classifier correctly. Using the dollar symbol would be compatible with how tools.deps resolves classifier

https://clojure.org/reference/deps_and_cli#_dependencies

2021-11-25 23 42 10

hlolli avatar Nov 25 '21 22:11 hlolli