Skip to content

Commit

Permalink
README: add section about non-flake usage
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvanderlinden authored Oct 6, 2024
1 parent afa7083 commit b6142d6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,22 @@ Next, use a specific Ruby package in `devenv.nix`:
languages.ruby.package = nixpkgs-ruby.packages.${pkgs.system}."ruby-2.7";
}
```

### Development shell (without flakes)

When you want to use `nix-shell` with a `shell.nix` or `default.nix` file, use an expression like:

```nix
{ nixpkgs ? import <nixpkgs>
, pkgs ? nixpkgs {}
, nixpkgs-ruby ? import (builtins.fetchTarball {
url = "https://github.com/bobvanderlinden/nixpkgs-ruby/archive/c1ba161adf31119cfdbb24489766a7bcd4dbe881.tar.gz";
})
, ruby ? nixpkgs-ruby.packages.${builtins.currentSystem}."ruby-3.2.2"
}:
pkgs.mkShell {
buildInputs = [
ruby
];
}
```

0 comments on commit b6142d6

Please sign in to comment.