Skip to content

Commit

Permalink
Install ruby-3.2 global with the nixpkgs privided pkg (#233)
Browse files Browse the repository at this point in the history
* Install ruby-3.2 global with the nixpkgs privided pkg

* Improve comment

* Make sure ruby exists in CI

* Update step name
  • Loading branch information
kachick authored Aug 1, 2023
1 parent d2c1b6c commit f6ef3f7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,20 @@ jobs:
${{ matrix.cleanup-script }}
- uses: actions/checkout@v3
- run: home-manager switch -f ./home-manager/user-github-actions.nix
- name: Print shell paths
- name: Print paths
run: |
which fish
which zsh
which bash # Be non nix shell
which ruby
which irb
# Do not use interactive mode here.
# Solutions as https://github.com/actions/runner/issues/241#issuecomment-924327172 will not fit with several problems
- name: Run customized dependencies
run: |
fish --command 'starship --version'
zsh -c 'which dprint'
zsh -c 'ruby --version'
zsh -c 'irb --version'
- name: Run homemade commands
run: zsh -c 'la'
7 changes: 5 additions & 2 deletions home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
enable = true;

# Replacement of `programs.direnv.enableNixDirenvIntegration = true;`
#
# Make much faster, but I may add nix_direnv_watch_file in several repositories when it has `.ruby-version`
# See following reference
# - https://github.com/nix-community/nix-direnv/blob/ed2cb75553b4864e3c931a48e3a2cd43b93152c5/README.md?plain=1#L368-L373
# - https://github.com/kachick/ruby-ulid/pull/410
nix-direnv = {
enable = true;
};
Expand Down Expand Up @@ -165,6 +170,4 @@
xdg.dataFile."homemade/bin/la".source = ../home/.local/share/homemade/bin/la.bash;
xdg.dataFile."homemade/bin/zj".source = ../home/.local/share/homemade/bin/zj.bash;
xdg.dataFile."homemade/bin/add_nix_channels".source = ../home/.local/share/homemade/bin/add_nix_channels.bash;
xdg.dataFile."homemade/bin/ruby".source = ../home/.local/share/homemade/bin/ruby.bash;
xdg.dataFile."homemade/bin/irb".source = ../home/.local/share/homemade/bin/irb.bash;
}
11 changes: 5 additions & 6 deletions home-manager/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,14 @@
# pkgs.gnumake
# pkgs.cargo-make

# This section is just a note for my strggle
# Often failed to build ruby even if I enabled following dependencies

# https://github.com/NixOS/nixpkgs/pull/218114
pkgs.ruby_3_2
# If you need to build cruby from source, this section may remind the struggle
# Often failed to build cruby even if I enabled following dependencies
# pkgs.zlib
# pkgs.libyaml
# pkgs.openssl
#
# Don't include nixpkgs ruby for complex gems and other handlings
# Prefer adhoc use of https://github.com/bobvanderlinden/nixpkgs-ruby as follows
# `nix shell github:bobvanderlinden/nixpkgs-ruby#'"ruby-3.2"' --command irb`

# As a boardgamer
# pkgs.tesseract
Expand Down
5 changes: 0 additions & 5 deletions home/.local/share/homemade/bin/irb.bash

This file was deleted.

5 changes: 0 additions & 5 deletions home/.local/share/homemade/bin/ruby.bash

This file was deleted.

0 comments on commit f6ef3f7

Please sign in to comment.