From 7ab6a92aa8d43d1bb7331906272adf1218270588 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 10 May 2022 21:21:12 -0700 Subject: [PATCH] libtree: 2.0.0 -> 3.1.0 This fixes a build failure by upgrading to a more recent version. --- .../tools/misc/libtree/default.nix | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/pkgs/development/tools/misc/libtree/default.nix b/pkgs/development/tools/misc/libtree/default.nix index f852b7ea7adf..141ccc24c36e 100644 --- a/pkgs/development/tools/misc/libtree/default.nix +++ b/pkgs/development/tools/misc/libtree/default.nix @@ -13,39 +13,25 @@ stdenv.mkDerivation rec { pname = "libtree"; - version = "2.0.0"; + version = "3.1.0"; src = fetchFromGitHub { owner = "haampie"; repo = "libtree"; rev = "v${version}"; - sha256 = "sha256-j54fUwMkX4x4MwL8gMraguK9GqQRBjCC+W6ojFnQdHQ="; + sha256 = "sha256-C5QlQsBL9Als80Tv13ex2XS5Yj50Ht8eDfGYAtnh/HI="; }; - patches = [ - # add missing include - # https://github.com/haampie/libtree/pull/42 - (fetchpatch { - url = "https://github.com/haampie/libtree/commit/219643ff6edcae42c9546b8ba38cfec9d19b034e.patch"; - sha256 = "sha256-vdFmmBdBiOT3QBcwd3SuiolcaFTFAb88kU1KN8229K0="; - }) - ]; - - postPatch = '' - substituteInPlace src/main.cpp \ - --replace "std::string strip = \"strip\";" "std::string strip = \"${binutils}/bin/strip\";" \ - --replace "std::string chrpath = \"chrpath\";" "std::string chrpath = \"${chrpath}/bin/chrpath\";" - ''; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ cxxopts elfio termcolor ]; - doCheck = true; + makeFlags = [ "PREFIX=$(out)" ]; + # note: "make check" returns exit code 0 even when the tests fail. + # This has been reported upstream: + # https://github.com/haampie/libtree/issues/77 checkInputs = [ gtest ]; - - cmakeFlags = [ "-DLIBTREE_BUILD_TESTS=ON" ]; + checkTarget = [ "check" ]; + doCheck = true; meta = with lib; { description = "Tree ldd with an option to bundle dependencies into a single folder";