Add a PHP 7.4 devshell
This commit is contained in:
parent
154ebacde5
commit
a7e145a3af
3 changed files with 46 additions and 1 deletions
19
flake.lock
generated
19
flake.lock
generated
|
@ -36,10 +36,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-php74": {
|
||||
"locked": {
|
||||
"lastModified": 1651667340,
|
||||
"narHash": "sha256-OUOe8zZ53ZlmATiNdhYkEIwbXAs9ZYrPhsRJwCS6VQI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "81b77fd3847a2eb23618b7cbaa23049ba6139fa2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "81b77fd3847a",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-php74": "nixpkgs-php74"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
nixpkgs-php74.url = "github:nixos/nixpkgs/81b77fd3847a";
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
@ -13,6 +15,7 @@
|
|||
|
||||
imports = [
|
||||
./modules/nodejs.nix
|
||||
./modules/php74.nix
|
||||
./modules/php81.nix
|
||||
./modules/php82.nix
|
||||
./modules/php83.nix
|
||||
|
|
25
modules/php74.nix
Normal file
25
modules/php74.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, system, ... }:
|
||||
let
|
||||
pkgs-php74 = import inputs.nixpkgs-php74 { inherit system; };
|
||||
|
||||
php = pkgs-php74.php74;
|
||||
phpPackages = pkgs-php74.php74Packages;
|
||||
in
|
||||
{
|
||||
devShells.php74 = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
php
|
||||
phpPackages.composer
|
||||
phpactor
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
php --version
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue