Add project shell

This commit is contained in:
Daniel Siepmann 2023-01-11 09:00:19 +01:00
parent c299c3d0ef
commit 20ab2377c9
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

50
shells/fes/shell.nix Normal file
View file

@ -0,0 +1,50 @@
{ pkgs ? import <nixpkgs> { } }:
let
projectFrontendReinstall = pkgs.writeShellApplication {
name = "project-frontend-reinstall";
runtimeInputs = [
pkgs.yarn
];
text = ''
rm -rf "$PROJECT_ROOT/frontend/node_modules"
yarn install --cwd="$PROJECT_ROOT/frontend/"
'';
};
projectFrontendCompile = pkgs.writeShellApplication {
name = "project-frontend-compile";
runtimeInputs = [
pkgs.yarn
];
text = ''
cd "$PROJECT_ROOT/frontend/"
NODE_OPTIONS=--openssl-legacy-provider yarn build
cd "$PROJECT_ROOT"
'';
};
in pkgs.mkShell {
name = "TYPO3";
buildInputs = [
projectFrontendReinstall
projectFrontendCompile
];
shellHook = ''
export PROJECT_ROOT="$(pwd)"
export PS1="\033[0;32m\]\W >\[\033[0m\] "
export typo3DatabaseName=testing
export typo3DatabaseHost=localhost
export typo3DatabaseUsername=testing
export typo3DatabasePassword=testing
export TYPO3_CONTEXT=Development/dsiepmann
export TYPO3_DATABASE=fes_de
export TYPO3_BASE=https://fes-de.andreas-wolf.localhost/
export TYPO3_ADDITIONAL_CONFIGURATION=/home/daniels/.local/share/typo3-configuration/AdditionalConfiguration.inc.php
'';
}