Created
November 21, 2023 09:14
-
-
Save drupol/117068bd346558407c4e99008ac1d004 to your computer and use it in GitHub Desktop.
flake.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "PHP development shell"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
systems.url = "github:nix-systems/default"; | |
nixpkgs_php7429.url = "github:NixOS/nixpkgs/1d8b8365a02efbf668311dc9db06cb98d49e7302"; | |
}; | |
outputs = inputs @ { self, flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { | |
systems = import inputs.systems; | |
perSystem = { config, self', inputs', pkgs, system, lib, ... }: { | |
_module.args.pkgs = import self.inputs.nixpkgs { | |
inherit system; | |
overlays = [ | |
(final: prev: { | |
nixpkgs_php7429 = import inputs.nixpkgs_php7429 { | |
inherit system; | |
}; | |
}) | |
]; | |
}; | |
devShells.default = pkgs.mkShellNoCC { | |
name = "php-dev"; | |
packages = | |
let | |
php74 = pkgs.nixpkgs_php7429.php74.buildEnv { | |
extensions = ({ enabled, all }: enabled ++ (with all; [ | |
pdo | |
redis | |
xdebug | |
])); | |
extraConfig = '' | |
xdebug.mode=debug | |
date.timezone=Australia/Brisbane | |
''; | |
}; | |
in | |
[ | |
php74 | |
php74.packages.composer | |
]; | |
}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment