Skip to content

Commit

Permalink
add nix flake for dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronfyfe committed Aug 29, 2023
1 parent 758ac7e commit 32aaba6
Show file tree
Hide file tree
Showing 3 changed files with 655 additions and 0 deletions.
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};

outputs = inputs @ { self, ... }:
(inputs.flake-utils.lib.eachDefaultSystem (system:
let

pkgs = import inputs.nixpkgs {
inherit system;
};

ruby = pkgs.ruby_3_0;

bundix = pkgs.bundix.override {
bundler = pkgs.bundler.override {
ruby = pkgs.ruby_3_0;
};
};

rubyGems = pkgs.bundlerEnv {
name = "ruby-gems-env";
inherit ruby;
gemdir = ./.;
};

shellPkgs = [
bundix
pkgs.bundler
ruby
rubyGems
] ++ (with pkgs; [
nodejs-18_x
]);

in
rec {

devShells = {
default = pkgs.mkShell {
buildInputs = shellPkgs;
BUNDLE_FORCE_RUBY_PLATFORM = "true";
};
};

}));
}
Loading

0 comments on commit 32aaba6

Please sign in to comment.