Streamline shell.nix
This commit is contained in:
parent
b396925dda
commit
119395a48c
1 changed files with 24 additions and 9 deletions
33
shell.nix
33
shell.nix
|
@ -1,11 +1,26 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
{
|
||||
pkgs ? import <nixpkgs> { }
|
||||
,phps ? import <phps>
|
||||
}:
|
||||
|
||||
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 {
|
||||
name = "project-install";
|
||||
runtimeInputs = [
|
||||
pkgs.php83
|
||||
pkgs.php83Packages.composer
|
||||
php
|
||||
composer
|
||||
projectTest
|
||||
];
|
||||
text = ''
|
||||
|
@ -16,7 +31,7 @@ let
|
|||
projectTest = pkgs.writeShellApplication {
|
||||
name = "project-test";
|
||||
runtimeInputs = [
|
||||
pkgs.php83
|
||||
php
|
||||
];
|
||||
text = ''
|
||||
./vendor/bin/phpunit
|
||||
|
@ -26,7 +41,7 @@ let
|
|||
projectRun = pkgs.writeShellApplication {
|
||||
name = "project-run";
|
||||
runtimeInputs = [
|
||||
pkgs.php83
|
||||
php
|
||||
];
|
||||
text = ''
|
||||
php -S 127.0.0.1:8080 -t public
|
||||
|
@ -38,8 +53,8 @@ let
|
|||
pkgs.git
|
||||
pkgs.rsync
|
||||
# Missing ssh
|
||||
pkgs.php83
|
||||
pkgs.php83Packages.composer
|
||||
php
|
||||
composer
|
||||
projectInstall
|
||||
];
|
||||
text = ''
|
||||
|
@ -71,8 +86,8 @@ let
|
|||
in pkgs.mkShellNoCC {
|
||||
name = "Fediverse-Feed-Wrappers";
|
||||
buildInputs = [
|
||||
pkgs.php83
|
||||
pkgs.php83Packages.composer
|
||||
php
|
||||
composer
|
||||
projectInstall
|
||||
projectTest
|
||||
projectRun
|
||||
|
|
Loading…
Reference in a new issue