Hi, Pjotr, Pjotr Prins <pjotr.publi...@thebird.nl> skribis:
> I have a working Ruby installation at > > > https://gitorious.org/guix/pjotrps-guix/source/61d21fad72d49cbbf0135b5ac7362bb0f64167fa:gnu/packages/ruby.scm > > This is my first GUIX package (I have written Nix packages before), so > please have a look. Overall looks good to me! A couple of comments: 59. (substitute* (filter file-exists? 60. '( 61. "ext/readline/readline.c" 62. )) Here we can assume that the file exists I believe, so the ‘filter’ call can be removed. 67. (substitute* (filter file-exists? 68. '( 69. "configure" 70. "configure.in" 71. "Makefile.in" 72. "ext/pty/pty.c" 73. "io.c" 74. "lib/mkmf.rb" 75. "process.c" 76. "test/rubygems/test_gem_ext_configure_builder.rb" 77. "test/rdoc/test_rdoc_parser.rb" 78. "test/ruby/test_rubyoptions.rb" 79. "test/ruby/test_process.rb" 80. "test/ruby/test_system.rb" 81. "tool/rbinstall.rb" 82. "tool/config.guess" 83. )) 84. (("/bin/sh") (which "sh")))) Likewise. In addition, I think only the .rb and .c files need to be patched, since the others are already handled automatically, normally. (In the future please send it as an in-line patch.) > I intend to patch rubygems so gems get installed in a $HOME dir > specifically named after the SHA. This will accomodate people who just > want to use rubygems. > > I am also going to add particalur gems to GUIX, each going into its > own expression. That will be a bit tricky because I don't want > Rubygems to install dependencies. Not sure how the Nix guys did it, so > I will study that. It may be helpful to have a ‘ruby-build-system’, akin to ‘python-build-system’ but with the right incantations (info "(guix) Build Systems"). > Do we have a HOWTO on how to run expressions in the Guile debugger? > Never used that and would like to see how individual statements > evaluate in LISP. Basically there are two approaches. From the command line, like this: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guile GNU Guile 2.0.11.20-4338f Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> ,use (gnu packages python) scheme@(guile-user)> ,use (guix) scheme@(guile-user)> (define s (open-connection)) scheme@(guile-user)> python $1 = #<package python-3.3.5 gnu/packages/python.scm:46 2946840> scheme@(guile-user)> (package-derivation s python) $2 = #<derivation /gnu/store/k0lvsy8jwcw0amv1rsmii2cvwfnmn2gz-python-3.3.5.drv => /gnu/store/ij8xgynicdmnzb7pzmyb6bqi17s0ll3y-python-3.3.5 3f4fdc0> scheme@(guile-user)> (build-derivations s (list $2)) $3 = #t --8<---------------cut here---------------end--------------->8--- But the best thing, if you use Emacs, is to use Geiser, as noted in ‘HACKING’. In addition to a REPL, it brings stuff like autodoc, jump-to-definition, expression evaluation from the buffer, etc. > I am really impressed with GUIX, and I think it is a no-brainer to use > a real functional programming language for this. Thanks Ludo and > others! I just wish I could use GUIX on servers where I don't have (and > won't get) root access. Or is there a way? With Nix I could run as a > normal user. It’s the same as Nix, which means that if the daemon cannot run as root, then it’s usable in a “degraded” mode (info "(guix) Build Environment Setup"). HTH, Ludo’.