From 1959939f50a792b93926fe10f5a94d9d8af84dfe Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Fri, 26 Jan 2018 12:14:53 -0800 Subject: [PATCH] Update to Nixpkgs 17.09 (#45) This is a "shallow" update, meaning that there are still several dependencies (such as `grpc` or Haskell packages) that are still pinned and those pins might not be necessary any longer after this change. --- nix/grpc.nix | 25 +++++++++++++++++++++---- nixpkgs.nix | 4 ++-- release.nix | 2 +- tests/LowLevelTests.hs | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/nix/grpc.nix b/nix/grpc.nix index aa7f11f..0f43b67 100644 --- a/nix/grpc.nix +++ b/nix/grpc.nix @@ -1,4 +1,5 @@ -{ pkgs, stdenv, lib, fetchgit, autoconf, automake, libtool, which, zlib, openssl +{ darwin, stdenv, lib, fetchgit, autoconf, automake, libtool, which, zlib +, openssl }: stdenv.mkDerivation rec { @@ -10,9 +11,19 @@ stdenv.mkDerivation rec { url = "https://github.com/grpc/grpc.git"; sha256 = "19ldbjlnbc287hkaylsigm8w9fai2bjdbfxk6315kl75cq54iprr"; }; - preInstall = "export prefix"; - buildInputs = - (if stdenv.isDarwin then [ pkgs.darwin.cctools ] else []) ++ [ + + # `grpc`'s `Makefile` does some magic to detect the correct `ld` and `strip` + # to use along with their flags, too. If Nix supplies `$LD` and `$STRIP` then + # this auto-detection fails and the build fails, which is why we unset the + # environment variables here and let the `Makefile` set them. + preBuild = '' + unset LD + unset STRIP + ''; + + preInstall = "export prefix"; + + buildInputs = [ autoconf automake libtool @@ -20,4 +31,10 @@ stdenv.mkDerivation rec { zlib openssl ]; + + # Some versions of `ar` (such as the one provided by OS X) require an explicit + # `-r` flag, whereas other versions assume `-r` is the default if no mode is + # specified. For example, OS X requires the `-r` flag, so as a precaution we + # always specify the flag. + AROPTS = "-r"; } diff --git a/nixpkgs.nix b/nixpkgs.nix index f00264c..5295b38 100644 --- a/nixpkgs.nix +++ b/nixpkgs.nix @@ -7,6 +7,6 @@ # The SHA256 will be printed as the last line of stdout. import ./fetch-nixpkgs.nix { - rev = "1849e695b00a54cda86cb75202240d949c10c7ce"; - sha256 = "1riv7n11rqbfdnikr2wm263fcppzh0760kqhwn5gscl89qmliw2y"; + rev = "74286ec9e76be7cd00c4247b9acb430c4bd9f1ce"; + sha256 = "0njb3qd2wxj7gil8y61lwh7zacmvr6zklv67w5zmvifi1fvalvdg"; } diff --git a/release.nix b/release.nix index 8c0031b..bba5f06 100644 --- a/release.nix +++ b/release.nix @@ -277,7 +277,7 @@ let }); swagger2 = - pkgs.haskell.lib.dontHaddock (haskellPackagesNew.callPackage ./nix/swagger2.nix { }); + pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.dontHaddock (haskellPackagesNew.callPackage ./nix/swagger2.nix { })); turtle = haskellPackagesNew.callPackage ./nix/turtle.nix { }; diff --git a/tests/LowLevelTests.hs b/tests/LowLevelTests.hs index 58945a1..9baa7f8 100644 --- a/tests/LowLevelTests.hs +++ b/tests/LowLevelTests.hs @@ -22,6 +22,7 @@ import Data.List (find) import qualified Data.Map.Strict as M import qualified Data.Set as S import GHC.Exts (fromList, toList) +import Network.GRPC.Unsafe.ChannelArgs (Arg(..)) import Network.GRPC.LowLevel import qualified Network.GRPC.LowLevel.Call.Unregistered as U import qualified Network.GRPC.LowLevel.Client.Unregistered as U