Get bundix working for the most part
This commit is contained in:
28
flake.nix
28
flake.nix
@@ -14,9 +14,9 @@
|
||||
};
|
||||
overlay = final: prev: rec {
|
||||
ruby = final.${rubyVer};
|
||||
bundler = prev.bundler.override { inherit ruby; };
|
||||
bundler = prev.bundler.override { ruby = final.ruby; };
|
||||
# Rev with Ruby 3 compat
|
||||
bundix = (prev.bundix.override { inherit bundler; }).overrideAttrs (prev: {
|
||||
bundix = (prev.bundix.override { bundler = final.bundler; }).overrideAttrs (prev: {
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "nix-community";
|
||||
repo = "bundix";
|
||||
@@ -24,7 +24,7 @@
|
||||
sha256 = "sha256-0CMDJR3xfewNuDthm3fEh6UPeRH9PURYxJ0PI1WPv4U=";
|
||||
};
|
||||
});
|
||||
danbooru = bundlerEnv final ruby;
|
||||
danbooru = bundlerEnv final final.ruby;
|
||||
};
|
||||
pkgs = (import nixpkgs {
|
||||
inherit system;
|
||||
@@ -32,17 +32,19 @@
|
||||
});
|
||||
in {
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
ruby_3_1 postgresql git redis curl nginx openssl coreutils ffmpeg gcc exiftool glib pkg-config
|
||||
];
|
||||
shellHook = ''
|
||||
PS1="(deps) $PS1"
|
||||
'';
|
||||
};
|
||||
bundix = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
bundix postgresql pkg-config
|
||||
NIX_PATH = "nixpkgs=${nixpkgs}";
|
||||
buildInputs = let
|
||||
bundix = pkgs.writeShellScriptBin "bundix" ''
|
||||
exec ${pkgs.bundix}/bin/bundix --ruby=${rubyVer} --gemset=gemset.nix "$@"
|
||||
'';
|
||||
in [
|
||||
pkgs.ruby
|
||||
pkgs.bundler
|
||||
bundix
|
||||
pkgs.postgresql
|
||||
pkgs.pkg-config
|
||||
pkgs.glib
|
||||
];
|
||||
shellHook = ''
|
||||
PS1="(bundix) $PS1"
|
||||
|
||||
Reference in New Issue
Block a user