Giter VIP home page Giter VIP logo

nix-phps's Introduction

nix-phps

This is a repository of Nix package expressions for old versions of PHP.

Warning: backwards compatibility is not guaranteed, pin this repo if you want to avoid breakage.

Why?

PHP projects like selfoss aim to support Linux distributions that maintain their own forks of no-longer-supported PHP versions (e.g. Debian). To be able to test those PHP versions in CI, we need Nix expressions for them. Since Nixpkgs avoids unmaintained software, we maintain those expressions here.

How to use?

We use Cachix to store x86_64-linux binaries of the built packages. Install it as described in its docs and then add the cache using cachix use fossar if you want to avoid building those PHP packages yourself.

This package is regularly updated to match latest Nixpkgs and the PHP packages use the same API as those in Nixpkgs.

The following versions are currently available:

  • php56
  • php70
  • php71
  • php72
  • php73
  • php74
  • php7427
  • php80
  • php81
  • php82

There is also a php package which is the alias of the default PHP version in Nixpkgs.

With niv

Assuming you have niv installed and initialized in your project, run niv add fossar/nix-phps.

Then, you will be able to use the PHP package, e.g. in shell.nix:

{
  sources ? import ./nix/sources.nix
}:

let
  nivOverlay =
    final:
    prev:
    {
      niv = (import sources.niv {}).niv;
    };

  pkgs = import sources.nixpkgs {
    overlays = [
      nivOverlay
    ];
    config = {
    };
  };

  phps = import sources.nix-phps;
in

pkgs.mkShell {
  buildInputs = [
    phps.packages.${builtins.currentSystem}.php

    # for easy updating
    pkgs.niv
  ];
}

With Nix flakes

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.

Add this repository to the inputs in your flake.nix’s:

  inputs = {phps.url = "github:fossar/nix-phps";
  };

then, in outputs, you will be able to use the PHP package

  outputs = { self, nixpkgs, phps, ... }: {
    devShell.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.mkShell {
      buildInputs = [
        phps.packages.x86_64-linux.php
      ];
    };
  };

nix-phps's People

Contributors

jtojnar avatar github-actions[bot] avatar drupol avatar aanderse avatar ktak-007 avatar mkg20001 avatar tristanpemble avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.