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

fix regex for darwin-aarch64 compatability #313

Merged
merged 1 commit into from May 31, 2021

Conversation

hlolli
Copy link
Contributor

@hlolli hlolli commented May 31, 2021

Currently I'm unable to run poetry2nix on aarch64-darwin, same as noted in this ticket NixOS/nix#4758 I'm also getting

error: invalid regular expression '^.*?(egg|tar|tar.bz2|tar.gz|tar.lz|tar.lzma|tar.xz|tbz|tgz|tlz|txz|whl|zip)'

I believe this is related to differences in stdlib++ versions, altough this is not my area of expertise.
The question mark isn't necessary here, I hope this showcases that

nix-repl> builtins.match "?(egg)" "asdf"
error: invalid regular expression '?(egg)'

       at «string»:1:1:

            1| builtins.match "?(egg)" "asdf"
             | ^
            2|

nix-repl> builtins.match "^.*?(egg)" "asdf"
error: invalid regular expression '^.*?(egg)'

       at «string»:1:1:

            1| builtins.match "^.*?(egg)" "asdf"
             | ^
            2|

nix-repl> builtins.match "^.*(egg)" "asdf"
null

nix-repl> builtins.match "^.*(egg)" "asdf.egg"
[ "egg" ]

nix-repl> builtins.match "^.*(egg)" ""
null

nix-repl> builtins.match "^.*(egg)" "egg"
[ "egg" ]

nix-repl> builtins.match "^.*(egg)" ".egg"
[ "egg" ]

@adisbladis adisbladis merged commit 18e151e into nix-community:master May 31, 2021
@adisbladis
Copy link
Member

Thank you for this fix and excellent description!

@hlolli hlolli deleted the fix-regex branch May 31, 2021 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants