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
Create a package for Rubinius. #64457
Comments
I played a bit with the derivation and got something that gets a bit further in compiling: { clangStdenv, fetchurl, llvm, openssl, bundlerEnv, git, which }:
let env = bundlerEnv {
name = "rubinius-env";
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in clangStdenv.mkDerivation rec {
name = "rubinius-${version}";
version = "4.3";
src = fetchurl {
url = "https://github.com/rubinius/rubinius/releases/download/v${version}/${name}.tar.bz2";
sha512 = "27033e1529c5c85f387af47d6cfadab4d55fd8214eda33670d43b8214cdb8a0c887f5343e7cda84483988430cb7808d80a7574d3d4b713cadaeecf97ebc70b69";
};
doCheck = true;
nativeBuildInputs = [ env.wrappedRuby env which llvm git openssl ];
patchPhase = ''
patchShebangs .
'';
configurePhase = ''
ruby configure
'';
buildPhase = ''
./build.sh
'';
installPhase = ''
mkdir -p $out
cp -r $src $out
'';
CXXFLAGS = "-Wno-unused-command-line-argument";
meta = with clangStdenv.lib; {
description = "Rubinius is a modern language platform that supports a number of programming languages, including Ruby";
homepage = https://github.com/rubinius/rubinius;
license = with licenses; [ mpl20 bsd3 ];
paltforms = platforms.linux;
};
} |
@manveru is there a particular reason you are invoking |
@Zacts thanks for starting this! @manveru hey! I was surprised to find you here! A couple notes about building:
Is there anything I can help with? |
Hey Brian, long time no see :) The problem on darwin is that it doesn't accept scripts as shebangs, and the Since I'm forced to use darwin this week for work anyway, I might as well try to get it to also work on that platform, but it will require some changes in how we setup environment variables and use I'm sure the work we're doing here can benefit a lot of people, that's why I'm chiming in :) |
Thanks @manveru! 😄 |
So here's the current progress: https://gist.github.com/manveru/b8090e1ff0c614b11094c7e6ec113f55 I'm not sure why it currently fails (some other missing executable?), but at least it gets pretty far. |
I probably won't get time today to continue much further, given that the C++ takes ages to compile as usual, so feel free to continue on it as you like. |
I'm testing your latest version on NixOS Linux now. |
Ok, here is what I'm getting: https://gist.github.com/zacts/05814823b4d81fe251c850a11013015c. |
I don't know if rake conflicts with the Nix philosophy of packaging ruby dependencies. I can post the error that I get without rake as well. |
My source 'https://rubygems.org' do
gem 'rake'
end I then run |
@manveru from your gist above, Rubinius built completely and installed the pre-installed gems, so that is great success! The build failed when trying to compile the VM (C++) tests, but there's no indication of why it failed. If you want to test that part without rebuilding everything (does Nix blow away the build dir?), you can run |
@Zacts did adding perl to the build fix the issue generating the VM C++ tests? |
@brixen I'm testing the build now. I'll post the results in just a sec. |
I am on NixOS Linux and from what I gather @manveru is on MacOS. I don't know if this might make a difference here. |
Let me try this with a fresh nixpkgs repo. I guess my previous above Gemfile that included |
I have forked nixpkgs. I wonder if we should eventually move to using that instead of gist. |
gist is good for quick edits though. |
I wasn't expecting to find a vendor/ directory appear in there, which I assume was created by the |
@brixen I'm still getting the same error. I don't know what the issue might be. I'll try to catch both of you on the Gitter channel. |
Since I got pretty far, i made a branch for my progress: https://github.com/manveru/nixpkgs/tree/add-rubinius The results are pretty encouraging, with only a handful of test failures which I might work on when I get a bit of spare time again (though feel free to have a go at them, they might even turn out to be bugs in rbx ;) https://gist.github.com/manveru/6f1dedccb9da2aa874cd3d5f04bd3ff3 |
Little note, never use |
after adding a HOME directory, i got the following backtrace: https://gist.github.com/manveru/fe0c870206c9a7e53057a1bb390d5ca2 |
@manveru I got the |
It appears to be the same build error that I have been previously getting on NixOS Linux. |
@Zacts @manveru thank you both for getting this started and mostly working. I'll use this Vagrant box to try to get a completely working build on Linux first, and then I'll take a look at macOS. |
@manveru 4.5 builds on Linux now but has an issue building the C-exts, investigating. |
@manveru would it be possible to have the build succeed even if there are some spec failures? Would Nix accept the package in that case? The issue is that some specs can be very sensitive to env issues, and if Rubinius builds and installs the pre-installed gems, it should be working fine. Alternatively, we could use |
@manveru left you a comment on your |
@jc00ke perhaps you may be able to help get this completed and Nix could be a way to address rubinius/rubinius#3819 since you could easily install Nix and then Rubinius if it were cached as a binary package, probably faster than RVM does whatever it does on Travis. |
@manveru bumping this... anything I can do to help get your patch merged? |
My build of @manveru’s branch has been stuck for a couple of hours. There are lots of |
Pass
We could accept without specs being run, yes. Although it would be preferable not to. |
@alyssais hi, thanks for your help on this! If you see my comments here and here, the build should complete with those changes. As for the specs running during package build, here are the issues:
Of course, there will be issues found from time to time, and that's the unavoidable nature of software. Running the specs on install won't prevent that. Helping people get a version installed will broaden the number of people who can help with issues. Since there's no PR actually associated with this ticket, would you like me to make a PR based on @manveru's patch and submit that? |
@alyssais Is there anything we need to do to merge this? |
Thank you for your contributions.
|
I marked this as stale due to inactivity. → More info |
I am working on creating a Nixpkgs package for the Rubinius language interpreter:
Rubinius GitHub. Here is my progress so far: https://gist.github.com/zacts/d9cf55a7312e78699e478be431fe2ec9 and https://gist.github.com/zacts/5b5a8a64ad7941821ba34e0f78404746.
The text was updated successfully, but these errors were encountered: