From 12f7ba6a3d4711c917a56bfca6e77ffd5e9caf35 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 4 Dec 2022 03:37:56 +0200 Subject: [PATCH] flake: add nixpkgs-for-php last nixpkgs version that has php74 is 22.05 error: php74 has been dropped due to the lack of maintanence from upstream for future releases there's hardly any testing possible with php so i won't mess with it --- flake.lock | 19 ++++++++++++++++++- flake.nix | 16 ++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 1e6d6ee..abb3bb5 100644 --- a/flake.lock +++ b/flake.lock @@ -16,9 +16,26 @@ "type": "github" } }, + "nixpkgs-for-php": { + "locked": { + "lastModified": 1670538458, + "narHash": "sha256-mvKmBkdlhzsMBtnzYXjYn08EGw9rFBEE9hp4Uqgol1Q=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "99ec06122f481588abafd91f2710d80a5320efe6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-for-php": "nixpkgs-for-php" } } }, diff --git a/flake.nix b/flake.nix index 15e5138..925d8a4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,13 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; + nixpkgs-for-php.url = "github:nixos/nixpkgs/nixos-22.05"; }; outputs = { self , nixpkgs + , nixpkgs-for-php , ... }@inputs: let @@ -20,15 +22,17 @@ pkgs = import nixpkgs { inherit system; }; + phpPkgs = import nixpkgs-for-php { + inherit system; + }; phpEnv = pkgs.mkShell { name = "gh-event-forwarder"; buildInputs = with pkgs; [ nix-prefetch-git - php - phpPackages.composer + phpPkgs.php + phpPkgs.phpPackages.composer git - php curl bash ]; @@ -85,6 +89,10 @@ inherit system; }; + phpPkgs = import nixpkgs-for-php { + inherit system; + }; + pkg = pkgs.rustPlatform.buildRustPackage { name = "ofborg"; src = pkgs.nix-gitignore.gitignoreSource [ ] ./.; @@ -142,7 +150,7 @@ test -e $out/bin/evaluation_filter ''; - ofborg.php = import ./php { inherit pkgs; }; + ofborg.php = import ./php { pkgs = phpPkgs; }; }); hydraJobs = {