Skip to content

asdf-vm: init at 0.7.8, fn-cli: init at 0.5.99 #92924

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

Closed
wants to merge 0 commits into from

Conversation

bolasblack
Copy link
Contributor

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jul 11, 2020
@ofborg ofborg bot requested a review from kalbasit July 11, 2020 21:00
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Jul 11, 2020
@toothbrush
Copy link
Contributor

toothbrush commented Sep 10, 2020

I'm very keen to have asdf-vm in my NixOS, so i tried out your patch rebased on current master. It installs fine, but i'm running into some issues perhaps you know about. This is running NixOS natively, so Linux, not macOS.

Firstly, it seems there's a dependency missing, because when i try to install Python as follows:

$ asdf plugin add python 
$ asdf install python 3.8.1 
.. lots of output ..
make: ar: No such file or directory

I was unable to find a related Nix package providing ar, maybe that's in coreutils? Anyway, perhaps that should be added as a runtime dependency? Or perhaps that's not the Nix way -- i'm still learning!

Secondly, i was able to install NodeJS as follows:

$ asdf plugin add nodejs
$ asdf install nodejs 12.18.3 
$ asdf shell nodejs 12.18.3
$ npm
/nix/store/gmkxfwl44lxfr9li8bk9f0qdr5xz8vpv-asdf-vm-0.7.8/asdf-vm/lib/commands/command-exec.bash: line 28: /home/paul/.asdf/installs/nodejs/12.18.3/bin/node: No such file or directory

What's really weird is that it seems Zsh is lying -- look at the following:

$ stat /home/paul/.asdf/installs/nodejs/12.18.3/bin/node
  File: /home/paul/.asdf/installs/nodejs/12.18.3/bin/node
  Size: 48646656  	Blocks: 95016      IO Block: 4096   regular file
Device: 1ch/28d	Inode: 1725141     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/    paul)   Gid: (  100/   users)
Access: 2020-09-10 11:31:00.361520349 +1000
Modify: 2020-07-23 01:00:17.000000000 +1000
Change: 2020-09-10 11:27:41.101404973 +1000
 Birth: 2020-09-10 11:27:40.854411014 +1000

So it's definitely there 🤔 Here's what i do in my .zshrc to make asdf available:

asdf=$(nix-build --no-out-link '<nixpkgs>' -I nixpkgs=$HOME/nixpkgs -A asdf-vm)
if [[ -d $asdf ]]; then
	. "$asdf/asdf-vm/asdf.sh"
fi

Apologies for the long story, but i'm hoping somebody can help please 😄

@toothbrush
Copy link
Contributor

As an update, installing binutils got me further with asdf install python 3.8.1, but next pip failed next saying it needs zlib. I wonder what would be the "Nix"y way of managing these dependencies?

@toothbrush
Copy link
Contributor

Aha, in reference to my previous message where i couldn't figure out why i was getting no such file or directory while the file was definitely there, that was a case of very bad error reporting. For context see https://unix.stackexchange.com/questions/18061/why-does-sh-say-not-found-when-its-definitely-there. The thing is that a precompiled NodeJS binary was being downloaded which simply didn't work on NixOS, because of missing /lib/... that most Linuxes provide.

I managed to find a workaround to force asdf to recompile NodeJS which i hope will work. We'll see. The workaround was found here: https://unix.stackexchange.com/questions/18061/why-does-sh-say-not-found-when-its-definitely-there

@SuperSandro2000 SuperSandro2000 changed the title Add package asdf-vm & fn-cli asdf-vm: init at 0.7.8, fn-cli: init at 0.5.99 Jan 18, 2021
@SuperSandro2000 SuperSandro2000 marked this pull request as draft January 18, 2021 17:31
@bolasblack bolasblack closed this May 22, 2021
@bolasblack bolasblack mentioned this pull request May 26, 2021
9 tasks
@bolasblack
Copy link
Contributor Author

bolasblack commented May 26, 2021

@SuperSandro2000 Hi, thanks for your suggestion, sorry for the so late reply, I finally(😝) has time to fix my PR

I created a new PR just for fn-cli #124447 (And also very thanks @toothbrush, I will create a new PR for asdf-vm later and try to fix the problem you encountered), can you help me check my new PR?

@bolasblack bolasblack mentioned this pull request May 26, 2021
9 tasks
@bolasblack
Copy link
Contributor Author

Hi @toothbrush , I created another PR #124495 , can you please try again?

@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants