From dcdaea355ad5b44dbb0b9929c21d83c247d77ac0 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 28 Jan 2018 01:09:22 -0800 Subject: [PATCH 1/3] rdma-core: fix paths in rxe_cfg --- pkgs/os-specific/linux/rdma-core/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/rdma-core/default.nix b/pkgs/os-specific/linux/rdma-core/default.nix index 22ce4a10f1c..a7cf884a854 100644 --- a/pkgs/os-specific/linux/rdma-core/default.nix +++ b/pkgs/os-specific/linux/rdma-core/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, cmake, pkgconfig -, ethtool, libnl, libudev, python, perl +, ethtool, nettools, libnl, libudev, python, perl } : let @@ -16,10 +16,13 @@ in stdenv.mkDerivation { }; nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ libnl ethtool libudev python perl ]; + buildInputs = [ libnl ethtool nettools libudev python perl ]; - postFixup = '' - substituteInPlace $out/bin/rxe_cfg --replace ethtool "${ethtool}/bin/ethtool" + postPatch = '' + substituteInPlace providers/rxe/rxe_cfg.in \ + --replace '@CMAKE_INSTALL_FULL_SHAREDSTATEDIR@' '/run' \ + --replace ethtool "${ethtool}/bin/ethtool" \ + --replace ifconfig "${nettools}/bin/ifconfig" ''; meta = with stdenv.lib; { From 7c554c13ee6073b035124a5070be0454dbaf4f38 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 28 Jan 2018 12:16:12 -0800 Subject: [PATCH 2/3] rdma-core: fix platform flag --- pkgs/os-specific/linux/rdma-core/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/rdma-core/default.nix b/pkgs/os-specific/linux/rdma-core/default.nix index a7cf884a854..5e697bcbb5f 100644 --- a/pkgs/os-specific/linux/rdma-core/default.nix +++ b/pkgs/os-specific/linux/rdma-core/default.nix @@ -29,6 +29,7 @@ in stdenv.mkDerivation { description = "RDMA Core Userspace Libraries and Daemons"; homepage = https://github.com/linux-rdma/rdma-core; license = licenses.gpl2; + platforms = platforms.linux; maintainers = with maintainers; [ markuskowa ]; }; } From c208456d3aaf9b290a477c6ba415ef38556f3443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 30 Jan 2018 23:01:25 +0000 Subject: [PATCH 3/3] rdma-core: set correct RUNDIR and SHAREDSTATEDIR --- pkgs/os-specific/linux/rdma-core/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/rdma-core/default.nix b/pkgs/os-specific/linux/rdma-core/default.nix index 5e697bcbb5f..77f94e544a0 100644 --- a/pkgs/os-specific/linux/rdma-core/default.nix +++ b/pkgs/os-specific/linux/rdma-core/default.nix @@ -18,9 +18,13 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ libnl ethtool nettools libudev python perl ]; + cmakeFlags = [ + "-DCMAKE_INSTALL_RUNDIR=/run" + "-DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib" + ]; + postPatch = '' substituteInPlace providers/rxe/rxe_cfg.in \ - --replace '@CMAKE_INSTALL_FULL_SHAREDSTATEDIR@' '/run' \ --replace ethtool "${ethtool}/bin/ethtool" \ --replace ifconfig "${nettools}/bin/ifconfig" '';