Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtree: 2.0.0 -> 3.1.0 #172446

Merged
merged 1 commit into from May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 8 additions & 22 deletions pkgs/development/tools/misc/libtree/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unused fetchpatch from inputs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sorry about that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you didn't push it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dammit. Sorry again. One of these days I will stop using open browser tabs as a to-do list...

#172783

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";
Expand Down