From 41687fe743ff5be54ce59575b628bbd3dec81aea Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Fri, 21 Feb 2020 16:40:22 +0100 Subject: [PATCH] Update to current nixpkgs-unstable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- default.nix | 2 +- nix/nixpkgs.json | 6 +++--- nix/overlay.nix | 12 ++++++++++++ php/default.nix | 5 +++-- release.nix | 7 ++++++- 5 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 nix/overlay.nix diff --git a/default.nix b/default.nix index 30930bc..e304bf8 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? import ./nix {} }: +{ pkgs ? import ./nix { overlays = [ (import ./nix/overlay.nix) ]; } }: let ofborgOverrides = { diff --git a/nix/nixpkgs.json b/nix/nixpkgs.json index dde64ed..714a1d7 100644 --- a/nix/nixpkgs.json +++ b/nix/nixpkgs.json @@ -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 } diff --git a/nix/overlay.nix b/nix/overlay.nix new file mode 100644 index 0000000..7e1b7a5 --- /dev/null +++ b/nix/overlay.nix @@ -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"; + }; + }; +}) + diff --git a/php/default.nix b/php/default.nix index d839f37..552a660 100644 --- a/php/default.nix +++ b/php/default.nix @@ -4,10 +4,11 @@ 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 { inherit composerEnv noDev; inherit (pkgs) fetchurl fetchgit fetchhg fetchsvn; -} \ No newline at end of file +} diff --git a/release.nix b/release.nix index 9693e2e..ac2e774 100644 --- a/release.nix +++ b/release.nix @@ -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) + ]; + }; }; } )