Skip to content

Instantly share code, notes, and snippets.

@CMCDragonkai
Created August 9, 2018 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CMCDragonkai/24e8da34f137ef3513a8bf849401c1b9 to your computer and use it in GitHub Desktop.
Save CMCDragonkai/24e8da34f137ef3513a8bf849401c1b9 to your computer and use it in GitHub Desktop.
Nix PHP Package #nix #php

Nix PHP Package

Shell.nix:

{
  pkgs ? import ./pkgs.nix,
  phpPath ? "php56"
}:
  with pkgs;
  let
    php = lib.getAttrFromPath (lib.splitString "." phpPath) pkgs;
    phpPackages = lib.getAttrFromPath (lib.splitString "." (phpPath + "Packages")) pkgs;
  in
    stdenv.mkDerivation rec {
      name = "php_project";
      src = null;
      buildInputs = [
        php
      ];
      shellHook = ''
        echo 'Entering ${name}'
      '';
    }

Pkgs.nix:

import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/650d8c93a16333e9390db0269327bd2d47f02fc7.tar.gz) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment