{"id":13799225,"url":"https://github.com/fossar/nix-phps","last_synced_at":"2025-09-04T19:10:37.677Z","repository":{"id":37003102,"uuid":"328251184","full_name":"fossar/nix-phps","owner":"fossar","description":"Repository of Nix expressions for old PHP versions","archived":false,"fork":false,"pushed_at":"2025-03-31T04:37:37.000Z","size":304,"stargazers_count":70,"open_issues_count":13,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T05:26:54.042Z","etag":null,"topics":["nix","nix-flake","php"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fossar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-09T21:40:06.000Z","updated_at":"2025-03-31T04:37:39.000Z","dependencies_parsed_at":"2023-02-16T00:31:07.982Z","dependency_job_id":"4940ce36-afe0-4418-93ea-b49cea38684f","html_url":"https://github.com/fossar/nix-phps","commit_stats":{"total_commits":379,"total_committers":16,"mean_commits":23.6875,"dds":0.5883905013192612,"last_synced_commit":"323d9eb87385473078ebdeef8873530c4f7dbbd7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossar%2Fnix-phps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossar%2Fnix-phps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossar%2Fnix-phps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fossar%2Fnix-phps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fossar","download_url":"https://codeload.github.com/fossar/nix-phps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464222,"owners_count":20942970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nix","nix-flake","php"],"created_at":"2024-08-04T00:01:00.049Z","updated_at":"2025-04-06T10:13:07.846Z","avatar_url":"https://github.com/fossar.png","language":"Nix","funding_links":[],"categories":["Programming Languages"],"sub_categories":["PHP"],"readme":"# nix-phps\n\nThis is a repository of Nix package expressions for old versions of PHP.\n\n\u003e [!CAUTION]\n\u003e Do not use versions other than the [currently supported ones](https://www.php.net/supported-versions.php) for public facing services. The older versions contain many security vulnerabilities and we do not have resources to backport security fixes. They are provided for development purposes only.\n\n\u003e [!WARNING]\n\u003e Backwards compatibility is not guaranteed, pin this repo if you want to avoid breakage.\n\n## Why?\n\nPHP projects like [selfoss](https://github.com/fossar/selfoss) aim to support Linux distributions that maintain their own forks of no-longer-supported PHP versions (e.g. [Debian](https://wiki.debian.org/PHP)). To be able to test those PHP versions in CI, we need Nix expressions for them. Since [Nixpkgs](https://github.com/NixOS/nixpkgs) avoids unmaintained software, we maintain those expressions here.\n\n## How to use?\n\nWe use [Cachix](https://app.cachix.org/cache/fossar) to store `x86_64-linux` binaries of the built packages. Install it as described in its [docs](https://docs.cachix.org/) and then add the cache using `cachix use fossar` if you want to avoid building those PHP packages yourself.\n\nThis package is regularly updated to match latest Nixpkgs and the PHP packages use the [same API as those in Nixpkgs](https://nixos.org/manual/nixpkgs/unstable/#sec-php).\n\nThe following versions are currently available:\n\n- `php56` **INSECURE!**\n- `php70` **INSECURE!**\n- `php71` **INSECURE!**\n- `php72` **INSECURE!**\n- `php73` **INSECURE!**\n- `php74` **INSECURE!**\n- `php80` **INSECURE!**\n- `php81`\n- `php82`\n- `php83`\n- `php84`\n\nThere is also a `php` package which is the alias of the default PHP version in Nixpkgs.\n\n### With niv\n\nAssuming you have [niv](https://github.com/nmattia/niv) installed and initialized in your project, run `niv add fossar/nix-phps`.\n\nThen, you will be able to use the PHP package, e.g. in `shell.nix`:\n\n```nix\n{\n  sources ? import ./nix/sources.nix\n}:\n\nlet\n  nivOverlay =\n    final:\n    prev:\n    {\n      niv = (import sources.niv {}).niv;\n    };\n\n  pkgs = import sources.nixpkgs {\n    overlays = [\n      nivOverlay\n    ];\n    config = {\n    };\n  };\n\n  phps = import sources.nix-phps;\nin\n\npkgs.mkShell {\n  buildInputs = [\n    phps.packages.${builtins.currentSystem}.php\n\n    # for easy updating\n    pkgs.niv\n  ];\n}\n```\n\n### With Nix flakes\n\n\u003e **Warning:** Nix flakes are experimental technology, use it only if you are willing to accept that you might need to change your code in the future.\n\nAdd this repository to the `inputs` in your `flake.nix`’s:\n\n```nix\n  inputs = {\n    …\n    phps.url = \"github:fossar/nix-phps\";\n  };\n```\n\nthen, in `outputs`, you will be able to use the PHP package\n\n```nix\n  outputs = { self, nixpkgs, phps, ... }: {\n    devShell.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.mkShell {\n      buildInputs = [\n        phps.packages.x86_64-linux.php\n      ];\n    };\n  };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffossar%2Fnix-phps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffossar%2Fnix-phps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffossar%2Fnix-phps/lists"}