| 21 Nov 2023 |
Adam Stotesbury | In reply to @rikudou:lemmings.world
This is my (working) config. Unless something changed in between versions, you can adapt it to php74:
environment.systemPackages = with pkgs; let
php82 = pkgs.php82.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
xdebug
redis
xsl
ffi
]));
extraConfig = ''
memory_limit=8G
xdebug.mode=debug
'';
};
in
[
php82
php82.packages.composer
php82Extensions.redis
php82Extensions.xsl
];
Thanks for sharing. I'll give this a crack | 07:56:16 |
Adam Stotesbury | In reply to @rikudou:lemmings.world Adam Stotesbury: Have you tried using my config? Not quite yet. Will do shortly | 07:56:25 |
rikudou@lemmings.world | Here's a fully working shell.nix with what you want, it can easily.3 .. | 07:56:37 |
rikudou@lemmings.world | * Here's a fully working shell.nix with what you want, it can easily be adapted:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages;
let
custom = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/0e4ade244d0f1b01a378aa58c235a1576778c1fd) {};
php74 = pkgs.php.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
xdebug
]));
extraConfig = ''
xdebug.mode=debug
date.timezone=Australia/Brisbane
'';
};
in
[
php74
custom.phpPackages.composer
custom.php74Extensions.pdo
custom.php74Extensions.redis
custom.php74Extensions.xdebug
];
}
| 07:56:59 |
rikudou@lemmings.world | * Here's a fully working shell.nix with what you want, it can easily be adapted to configuration.nix:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages;
let
custom = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/0e4ade244d0f1b01a378aa58c235a1576778c1fd) {};
php74 = pkgs.php.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
xdebug
]));
extraConfig = ''
xdebug.mode=debug
date.timezone=Australia/Brisbane
'';
};
in
[
php74
custom.phpPackages.composer
custom.php74Extensions.pdo
custom.php74Extensions.redis
custom.php74Extensions.xdebug
];
}
| 07:57:11 |
Adam Stotesbury | Thank you! | 07:57:33 |
rikudou@lemmings.world | * Here's a fully working shell.nix with what you want, it can easily be adapted to configuration.nix:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages;
let
custom = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/1d8b8365a02efbf668311dc9db06cb98d49e7302) {};
php74 = pkgs.php74.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
xdebug
]));
extraConfig = ''
xdebug.mode=debug
date.timezone=Australia/Brisbane
'';
};
in
[
php74
custom.phpPackages.composer
custom.php74Extensions.pdo
custom.php74Extensions.redis
custom.php74Extensions.xdebug
];
}
| 07:57:49 |
rikudou@lemmings.world | * Here's a fully working shell.nix with what you want, it can easily be adapted to configuration.nix:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages;
let
custom = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/0e4ade244d0f1b01a378aa58c235a1576778c1fd) {};
php74 = pkgs.php.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
xdebug
]));
extraConfig = ''
xdebug.mode=debug
date.timezone=Australia/Brisbane
'';
};
in
[
php74
custom.phpPackages.composer
custom.php74Extensions.pdo
custom.php74Extensions.redis
custom.php74Extensions.xdebug
];
}
| 07:58:19 |
rikudou@lemmings.world | * Here's a fully working shell.nix with what you want, it can easily be adapted to configuration.nix:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages;
let
custom = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/1d8b8365a02efbf668311dc9db06cb98d49e7302) {};
php74 = custom.php74.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
xdebug
]));
extraConfig = ''
xdebug.mode=debug
date.timezone=Australia/Brisbane
'';
};
in
[
php74
custom.php74Packages.composer
custom.php74Extensions.pdo
custom.php74Extensions.redis
custom.php74Extensions.xdebug
];
}
| 07:59:59 |
rikudou@lemmings.world | I've updated it a bit, there was a mistake | 08:00:32 |
rikudou@lemmings.world | Also, you might want to use a project of mine for getting older versions, for example: https://history.nix-packages.com/search?packageName=php74
It should have the latest version the package is found in, meaning the newest available dependencies for each version | 08:04:31 |
Adam Stotesbury | Thank you! This is exactly what I was looking for earlier, amazing! | 08:05:54 |
Pol | In reply to @rikudou:lemmings.world Also, you might want to use a project of mine for getting older versions, for example: https://history.nix-packages.com/search?packageName=php74
It should have the latest version the package is found in, meaning the newest available dependencies for each version You should add the template for flake inputs ! :) | 08:17:08 |
rikudou@lemmings.world | In reply to @drupol:matrix.org You should add the template for flake inputs ! :) I haven't worked with Flakes yet :/ Can you provide an example of what it would look like? Or better yet, create a PR? It's in this file: https://github.com/RikudouSage/NixPackageHistoryFrontend/blob/master/src/app/pages/package-detail/package-detail.component.html | 08:18:30 |
Pol | This is what a typical inputs set looks like in a flake: | 08:25:51 |
Pol |  Download image.png | 08:25:54 |
Pol | If I wanted to add php74 to it, I would do: | 08:26:06 |
Pol |  Download image.png | 08:27:11 |
Pol | Sadly, I won't be able to provide a PR these days, sorry :( quite busy with work and life recently | 08:27:43 |
rikudou@lemmings.world | And how do I install it afterwards? | 08:28:11 |
Pol | Oh right | 08:29:09 |
Pol | I forgot the part where we include the overlay. | 08:29:16 |
Adam Stotesbury | In reply to @rikudou:lemmings.world I've updated it a bit, there was a mistake Just wanted to thank you again for your help. Got me on the right path. First time user of NixOs and even though it's taking me awhile to wrap my head around it I'm loving it so far. Really appreciate you taking the time to help. | 08:29:25 |
rikudou@lemmings.world | In reply to @stotes:matrix.org Just wanted to thank you again for your help. Got me on the right path. First time user of NixOs and even though it's taking me awhile to wrap my head around it I'm loving it so far. Really appreciate you taking the time to help. No problem! I've been in the exact same spot just a month (or so) ago! | 08:29:52 |
Adam Stotesbury | 😄🙏 | 08:30:15 |
Pol |  Download image.png | 08:31:50 |
Pol | Then, you can use php74, by doing:pkgs.php7429.php | 08:32:05 |
rikudou@lemmings.world | Thanks! | 08:32:42 |
Pol | you really should look at Flakes | 08:33:01 |
Pol | This is a Nix killer feature :) | 08:33:10 |