-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cannot support NixOS #116
Comments
|
It cannot work: NIX_BINTOOLS=/nix/store/ngh5s155lcm1hwsakrfhla536x9g5v4z-binutils-wrapper-2.40 bundle install |
Can you please provide log with |
Also, if you already have a broken installation in place, you will have to uninstall that first, before running |
|
Oh never mind, I now see the issue. You need to force platform ruby: bundle config force_ruby_platform true The prebuilt packages do not contain the Rakefile thus will never work on NixOS. |
In NixOS, you should almost always |
Is there a way to tell it to use existing dart-saas? |
NixOS should work in latest version now. There are two different types of installation:
|
Here is an example of using
|
@ntkme @domenkozar I'm trying to get this to work in a devenv shell: # devenv.nix
{ pkgs, lib, config, inputs, ... }:
{
env.JEKYLL_ENV = "development";
languages.ruby.enable = true;
languages.ruby.versionFile = ./.ruby-version;
languages.javascript = {
enable = true;
};
packages = [ pkgs.git pkgs.imagemagick pkgs.dart-sass ];
enterShell = ''
exec zsh
'';
}
...but I'm still getting an error about the dynamically linked executable:
Is there something I'm missing? |
I cannot reproduce your issue with the exact same config in nixos container running on a normal linux kernel. I wonder if nix kernel behaves differently than normal kernel...
|
Given that it works on nixos container running on a normal linux kernel, the ld-linux and glibc in nix clearly works with foreign binaries. On normal kernel, executing a foreign binary linked with unknown ld-linux should result in @joshuap Can you please try if the following patch helps? diff --git a/lib/sass/compiler/connection.rb b/lib/sass/compiler/connection.rb
index d59f46d..4fbde9d 100644
--- a/lib/sass/compiler/connection.rb
+++ b/lib/sass/compiler/connection.rb
@@ -13,8 +13,6 @@ module Sass
def initialize
@mutex = Mutex.new
@stdin, @stdout, @stderr, @wait_thread = begin
- Open3.popen3(*CLI::COMMAND, '--embedded', chdir: __dir__)
- rescue Errno::ENOENT
require_relative '../elf'
raise if ELF::INTERPRETER.nil?
|
@ntkme your patch worked! It looks like that Open3 command is not raising anything. I tried running it directly in the console and this is the result:
|
Ok, it runs out the unexpected behavior is not coming from nixos kernel, but a config: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/stub-ld.nix This is something new in NixOS 24.05. |
@joshuap A new workaround is shipped with v1.79.4, and it should work out of box now. Please give it a try. |
Unfortunately I'm seeing the same issue, I think this should work?
|
Ok, I think I have found out why. In a normal linux, there is only one
In NixOS, there are always two of them:
And having two breaks some assumptions in the current workaround... |
@joshuap Can you please help verify if the fix works by testing the following on your system? git clone https://github.com/sass-contrib/sass-embedded-host-ruby.git
cd sass-embedded-host-ruby
bundle install
bundle exec rake compile spec |
@ntkme The tests passed!
|
@joshuap The fix has been release in |
This gem will download
.bundle/ruby/2.7.0/gems/sass-embedded-1.61.0-x86_64-linux-gnu/ext/sass/sass_embedded/src/dart
for me. However, My OS is NixOS, which doesn't respect HFS so it must patchelf every program respect HFS. How can I use the dart installed by nix (package manager of NixOS) to replace the downloaded dart? That is it will searchdart
in$PATH
, then use it, not use.bundle/ruby/2.7.0/gems/sass-embedded-1.61.0-x86_64-linux-gnu/ext/sass/sass_embedded/src/dart
directly. Thanks!The text was updated successfully, but these errors were encountered: