diff --git a/content/meta/index.json b/content/meta/index.json index 052f7dff4..7a9416437 100644 --- a/content/meta/index.json +++ b/content/meta/index.json @@ -6542,5 +6542,12 @@ ], "path_alias.2fe5f520-3f6f-41a8-a05f-d0be257a856a": [ "node.189d6034-5777-4ee1-93c1-20e255b6a32e" + ], + "node.ec55d813-d412-4cfd-8ca1-1b3a7ac5ac3d": [ + "user.b8966985-d4b2-42a7-a319-2e94ccfbb849", + "node.20cde1b4-efdc-46a4-a6a4-4fd2264f617e" + ], + "path_alias.af132f0b-d93e-4063-af33-6935fbaa445f": [ + "node.ec55d813-d412-4cfd-8ca1-1b3a7ac5ac3d" ] } \ No newline at end of file diff --git a/content/node.ec55d813-d412-4cfd-8ca1-1b3a7ac5ac3d.json b/content/node.ec55d813-d412-4cfd-8ca1-1b3a7ac5ac3d.json new file mode 100644 index 000000000..6c17079f5 --- /dev/null +++ b/content/node.ec55d813-d412-4cfd-8ca1-1b3a7ac5ac3d.json @@ -0,0 +1,97 @@ +{ + "uuid": [ + { + "value": "ec55d813-d412-4cfd-8ca1-1b3a7ac5ac3d" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "daily_email", + "target_type": "node_type", + "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" + } + ], + "revision_timestamp": [ + { + "value": "2025-06-27T09:43:46+00:00" + } + ], + "revision_uid": [ + { + "target_type": "user", + "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" + } + ], + "revision_log": [], + "status": [ + { + "value": true + } + ], + "uid": [ + { + "target_type": "user", + "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" + } + ], + "title": [ + { + "value": "Nix and older versions of PHP" + } + ], + "created": [ + { + "value": "2025-06-25T09:33:51+00:00" + } + ], + "changed": [ + { + "value": "2025-06-27T09:43:46+00:00" + } + ], + "promote": [ + { + "value": false + } + ], + "sticky": [ + { + "value": false + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [ + { + "value": true + } + ], + "path": [ + { + "alias": "\/daily\/2025\/06\/25\/nix-and-older-versions-php", + "langcode": "en" + } + ], + "body": [ + { + "value": "Yesterday, I wrote about [using Nix to create shells for different versions of PHP][1].\r\n\r\nThe current stable version of Nix has PHP 8.4.8, 8.3.22, 8.2.28 and 8.1.32, but what if you need an older version?\r\n\r\nIf it has been in nixpkgs previously, it can still be accessed.\r\n\r\nNix allows you to create different channels to install different versions of the nixpkgs repository and access different sets of packages.\r\n\r\nWith flakes, different versions of nixpkgs can be used as inputs to add multiple releases, such as [stable and unstable][0], or older releases or even a specific Git commit.\r\n\r\nFor example, if I needed to use PHP 7.4 - which is not available in the current release - I could use this flake.nix file:\r\n\r\n```nix\r\n{\r\n inputs = {\r\n nixpkgs-php74.url = \"github:nixos\/nixpkgs\/81b77fd3847a\";\r\n };\r\n\r\n outputs = { nixpkgs-php74, ... }:\r\n let\r\n system = \"x86_64-linux\";\r\n pkgs = import nixpkgs-php74 { inherit system; };\r\n in {\r\n devShells.${system}.default = pkgs.mkShell {\r\n packages = [\r\n pkgs.php74\r\n ];\r\n };\r\n };\r\n}\r\n```\r\n\r\nPinning nixpkgs to that commit hash gives me access to `php74`, which I can access using `nix develop`.\r\n\r\nThis approach works with any package in nixpkgs - not just PHP.\r\n\r\nOr, if it wasn't available in an older version of nixpkgs, I can write a custom derivation and add it myself.\r\n\r\n[0]: \/daily\/2025\/05\/25\/why-i-prefer-rolling-linux-distribution\r\n[1]: \/daily\/2025\/06\/24\/php-and-nix-shells", + "format": "markdown", + "processed": "

Yesterday, I wrote about using Nix to create shells for different versions of PHP<\/a>.<\/p>\n

The current stable version of Nix has PHP 8.4.8, 8.3.22, 8.2.28 and 8.1.32, but what if you need an older version?<\/p>\n

If it has been in nixpkgs previously, it can still be accessed.<\/p>\n

Nix allows you to create different channels to install different versions of the nixpkgs repository and access different sets of packages.<\/p>\n

With flakes, different versions of nixpkgs can be used as inputs to add multiple releases, such as stable and unstable<\/a>, or older releases or even a specific Git commit.<\/p>\n

For example, if I needed to use PHP 7.4 - which is not available in the current release - I could use this flake.nix file:<\/p>\n

{\n  inputs = {\n    nixpkgs-php74.url = \"github:nixos\/nixpkgs\/81b77fd3847a\";\n  };\n\n  outputs = { nixpkgs-php74, ... }:\n    let\n      system = \"x86_64-linux\";\n      pkgs = import nixpkgs-php74 { inherit system; };\n    in {\n      devShells.${system}.default = pkgs.mkShell {\n        packages = [\n          pkgs.php74\n        ];\n      };\n    };\n}\n<\/code><\/pre>

Pinning nixpkgs to that commit hash gives me access to php74<\/code>, which I can access using nix develop<\/code>.<\/p>\n

This approach works with any package in nixpkgs - not just PHP.<\/p>\n

Or, if it wasn't available in an older version of nixpkgs, I can write a custom derivation and add it myself.<\/p>\n", + "summary": "" + } + ], + "field_daily_email_cta": [ + { + "target_type": "node", + "target_uuid": "20cde1b4-efdc-46a4-a6a4-4fd2264f617e" + } + ] +} \ No newline at end of file diff --git a/content/path_alias.af132f0b-d93e-4063-af33-6935fbaa445f.json b/content/path_alias.af132f0b-d93e-4063-af33-6935fbaa445f.json new file mode 100644 index 000000000..30deca45e --- /dev/null +++ b/content/path_alias.af132f0b-d93e-4063-af33-6935fbaa445f.json @@ -0,0 +1,27 @@ +{ + "uuid": [ + { + "value": "af132f0b-d93e-4063-af33-6935fbaa445f" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "path": [ + { + "value": "\/node\/ec55d813-d412-4cfd-8ca1-1b3a7ac5ac3d" + } + ], + "alias": [ + { + "value": "\/daily\/2025\/06\/25\/nix-and-older-versions-php" + } + ], + "status": [ + { + "value": true + } + ] +} \ No newline at end of file