Add new devshell
Some checks failed
Cachix / build (marabethia) (push) Waiting to run
Cachix / build (elendel) (push) Successful in 1m58s
Cachix / build (kholinar) (push) Has been cancelled

This commit is contained in:
Charlotte Van Petegem 2025-04-20 17:01:55 +02:00
parent 2ad829663c
commit 17784ba5e6
Signed by: chvp
SSH key fingerprint: SHA256:s9rb8jBVfdahqWHuBAcHCBP1wmj4eYQXZfqgz4H3E9E

45
shells/entrance-exam.nix Normal file
View file

@ -0,0 +1,45 @@
{ pkgs, inputs, ... }:
let
support-services = {
css.command = "yarn build:css --watch";
js.command = "yarn build:js --watch=forever";
};
all-services = support-services // {
rails = {
name = "server";
command = "rails s -p 3000";
};
};
in
pkgs.devshell.mkShell {
name = "Entrance exam";
imports = [ "${inputs.devshell}/extra/language/ruby.nix" ];
packages = with pkgs; [
chromedriver
ungoogled-chromium
nodejs
nodePackages.typescript-language-server
yarn
bundix
];
commands = [
{
name = "refresh-deps";
category = "general commands";
help = "Install dependencies";
command = ''
yarn install
bundle install
bundle pristine
'';
}
];
serviceGroups = {
server.services = all-services;
server-support.services = support-services;
};
language.ruby = {
package = pkgs.ruby_3_4;
nativeDeps = [ pkgs.openssl pkgs.zlib pkgs.libffi pkgs.libyaml ];
};
}