Update to current nixpkgs-unstable

This required the introduction of an overlay file since ofBorg still
requires openssl 1.0.2. Updating to newer version of openssl also
requires updating the amqp library which requires some more involved
changes.

The php code is only updated to php 7.2 and not 7.3 (the default in
nixpkgs) since there seem to been a few syntax changes that aren't yet
compatible with composer2nix.

In previous versions of the rust infrastructure within nixpkgs we would
have been able to override all crates during the invocation of the
target crate. That `override` feature was removed as it caused a huge
eval overhead for larger projects. We did end up with (n^2)
instantiations of dependencies since they were being overriden on every
invocation of every dependency on every level further down the chain.
The current understanding is that the build tooling that each project is
using (e.g.  crate2nix, crate2nix, …) that is driving the actual build
could easily reintroduce that feature without the overhead.

pin to php72
This commit is contained in:
Andreas Rammhold 2020-02-21 16:40:22 +01:00
parent 5dee76e9b2
commit 41687fe743
No known key found for this signature in database
GPG key ID: E432E410B5E48C86
5 changed files with 25 additions and 7 deletions

View file

@ -1,4 +1,4 @@
{ pkgs ? import ./nix {} }:
{ pkgs ? import ./nix { overlays = [ (import ./nix/overlay.nix) ]; } }:
let
ofborgOverrides = {

View file

@ -1,7 +1,7 @@
{
"url": "https://github.com/nixos/nixpkgs-channels.git",
"rev": "201d739b0ffbebceb444864d1856babcd1a666a8",
"date": "2018-12-30T01:29:37+00:00",
"sha256": "0mfkzmylglpw84w85zs3djpspcx45bg3s62hk4j44dxl2p0fvggj",
"rev": "e2b4abe3c8f2e09adfc6a52007841d1b96c89371",
"date": "2020-02-19T01:57:21+01:00",
"sha256": "1l3jfr74s7wmx3fk5y76ayazbfclvnr532kg1hypbzydp3n372rz",
"fetchSubmodules": false
}

12
nix/overlay.nix Normal file
View file

@ -0,0 +1,12 @@
(self: super: {
defaultCrateOverrides = super.defaultCrateOverrides // {
openssl-sys = attrs: {
buildInputs = [ self.openssl_1_0_2 ];
nativeBuildInputs = [ self.pkgconfig ];
};
openssl = attrs: {
DEP_OPENSSL_VERSION = "102";
};
};
})

View file

@ -4,7 +4,8 @@
let
composerEnv = import ./composer-env.nix {
inherit (pkgs) stdenv writeTextFile fetchurl php unzip;
inherit (pkgs) stdenv writeTextFile fetchurl unzip;
php = pkgs.php72;
};
in
import ./php-packages.nix {

View file

@ -15,7 +15,12 @@ let
(collector: system:
collector // {
"${system}" = import ./. {
pkgs = import nixpkgs { inherit system; };
pkgs = import nixpkgs {
inherit system;
overlays = [
(import ./nix/overlay.nix)
];
};
};
}
)