Created
September 19, 2023 14:15
-
-
Save guillemcanal/1def4284be3fe00f70f98c9a406d30b7 to your computer and use it in GitHub Desktop.
nix overlay
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
self: super: | |
{ | |
php = super.php82.buildEnv { | |
extensions = ({ enabled, all }: enabled ++ ( | |
with all; [ | |
xdebug | |
redis | |
amqp | |
]) | |
); | |
extraConfig = " | |
xdebug.mode=debug | |
memory_limit=256M | |
"; | |
}; | |
nodejs = super.nodejs-18_x; | |
yarn = super.yarn.override { nodejs = self.nodejs; }; | |
composer = self.php.packages.composer; | |
psysh = self.php.packages.psysh; | |
# Install Nix packages globally | |
# $ nix-env -f '<nixpkgs>' -r -iA userPackages && nix-rebuild | |
userPackages = super.userPackages or {} // { | |
inherit (self) | |
nix | |
direnv | |
php | |
composer | |
psysh | |
nodejs | |
yarn | |
symfony-cli; | |
nix-rebuild = super.writeScriptBin "nix-rebuild" '' | |
#!${super.stdenv.shell} | |
if ! command -v nix-env &>/dev/null; then | |
echo "warning: nix-env was not found in PATH, add nix to userPackages" >&2 | |
PATH=${self.nix}/bin:$PATH | |
fi | |
exec nix-env -f '<nixpkgs>' -r -iA userPackages "$@" | |
''; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment