Skip to content

Commit

Permalink
Fix and prevent uninstallable io-console on Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Dec 26, 2024
1 parent a31bdd7 commit 9e29299
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ on:
- 'flake.*'
- '.ruby-version'
- 'dprint.json'
- '**.gemspec'
- 'Gemfile'
pull_request:
paths:
- '.github/workflows/ci-nix.yml'
- '**.nix'
- 'flake.*'
- '.ruby-version'
- 'dprint.json'
- '**.gemspec'
- 'Gemfile'
schedule:
# Every 10:42 JST
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
Expand Down
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShellNoCC {
# Require CC to build io-console
default = pkgs.mkShell {
buildInputs =
(with pkgs; [
# https://github.com/NixOS/nix/issues/730#issuecomment-162323824
Expand Down

1 comment on commit 9e29299

@kachick
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this

An error occurred while installing io-console (0.8.0), and Bundler cannot continue.

In Gemfile:
  rspec-matchers-power_assert_matchers was resolved to 0.3.0, which depends on
    irb was resolved to 1.14.3, which depends on
      reline was resolved to 0.6.0, which depends on
        io-console
> bat  /home/kachick/repos/github.com/kachick/rspec-matchers-power_assert_matchers/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/mkmf.log
LD_LIBRARY_PATH=.:/nix/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/lib "gcc -o conftest -I/nix/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/include/ruby-3.3.0/x86_64-linux -I/nix
/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/include/ruby-3.3.0/ruby/backward -I/nix/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/include/ruby-3.3.0 -I.    -O3 -fPIC conftest.c
-L. -L/nix/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/lib -Wl,-rpath,/nix/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dyn
amic -Wl,--no-as-needed     -Wl,-rpath,/nix/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/lib -L/nix/store/0ws1v8mcnqh6zkhdw7i5p5yb0rvcx188-ruby-3.3.5/lib -lruby-3.3.5  -lm -lpthread  -
lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

Please sign in to comment.