Streamline shell.nix

This commit is contained in:
Daniel Siepmann 2024-03-05 19:39:12 +01:00
parent b396925dda
commit 119395a48c
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -1,11 +1,26 @@
{ pkgs ? import <nixpkgs> { } }: {
pkgs ? import <nixpkgs> { }
,phps ? import <phps>
}:
let let
php = phps.packages.x86_64-linux.php83.buildEnv {
extensions = { enabled, all }: enabled ++ (with all; [
xdebug
]);
extraConfig = ''
xdebug.mode = debug
memory_limit = 4G
'';
};
inherit(php.packages) composer;
projectInstall = pkgs.writeShellApplication { projectInstall = pkgs.writeShellApplication {
name = "project-install"; name = "project-install";
runtimeInputs = [ runtimeInputs = [
pkgs.php83 php
pkgs.php83Packages.composer composer
projectTest projectTest
]; ];
text = '' text = ''
@ -16,7 +31,7 @@ let
projectTest = pkgs.writeShellApplication { projectTest = pkgs.writeShellApplication {
name = "project-test"; name = "project-test";
runtimeInputs = [ runtimeInputs = [
pkgs.php83 php
]; ];
text = '' text = ''
./vendor/bin/phpunit ./vendor/bin/phpunit
@ -26,7 +41,7 @@ let
projectRun = pkgs.writeShellApplication { projectRun = pkgs.writeShellApplication {
name = "project-run"; name = "project-run";
runtimeInputs = [ runtimeInputs = [
pkgs.php83 php
]; ];
text = '' text = ''
php -S 127.0.0.1:8080 -t public php -S 127.0.0.1:8080 -t public
@ -38,8 +53,8 @@ let
pkgs.git pkgs.git
pkgs.rsync pkgs.rsync
# Missing ssh # Missing ssh
pkgs.php83 php
pkgs.php83Packages.composer composer
projectInstall projectInstall
]; ];
text = '' text = ''
@ -71,8 +86,8 @@ let
in pkgs.mkShellNoCC { in pkgs.mkShellNoCC {
name = "Fediverse-Feed-Wrappers"; name = "Fediverse-Feed-Wrappers";
buildInputs = [ buildInputs = [
pkgs.php83 php
pkgs.php83Packages.composer composer
projectInstall projectInstall
projectTest projectTest
projectRun projectRun