Merge pull request #148567 from prusnak/libtree

libtree: init at 2.0.0
This commit is contained in:
Pavol Rusnak 2021-12-08 22:38:46 +01:00 committed by GitHub
commit b43d81f35b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 134 additions and 0 deletions

View File

@ -0,0 +1,34 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, boost
}:
stdenv.mkDerivation rec {
pname = "elfio";
version = "3.9";
src = fetchFromGitHub {
owner = "serge1";
repo = "elfio";
rev = "Release_${version}";
sha256 = "sha256-5O9KnHZXzepp3O1PGenJarrHElWLHgyBvvDig1Hkmo4=";
};
nativeBuildInputs = [ cmake ];
checkInputs = [ boost ];
cmakeFlags = [ "-DELFIO_BUILD_TESTS=ON" ];
doCheck = true;
meta = with lib; {
description = "Header-only C++ library for reading and generating files in the ELF binary format";
homepage = "https://github.com/serge1/ELFIO";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ prusnak ];
};
}

View File

@ -0,0 +1,37 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "termcolor";
version = "2.0.0";
src = fetchFromGitHub {
owner = "ikalnytskyi";
repo = "termcolor";
rev = "v${version}";
sha256 = "sha256-W0hB+lFJ2sm7DsbOzITOtjJuntSM55BfwUunOOS4RcA=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DTERMCOLOR_TESTS=ON" ];
doCheck = true;
checkPhase = ''
runHook preCheck
./test_termcolor
runHook postCheck
'';
meta = with lib; {
description = "Header-only C++ library for printing colored messages";
homepage = "https://github.com/ikalnytskyi/termcolor";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ prusnak ];
};
}

View File

@ -0,0 +1,57 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, binutils
, chrpath
, cmake
, cxxopts
, elfio
, termcolor
, gtest
}:
stdenv.mkDerivation rec {
pname = "libtree";
version = "2.0.0";
src = fetchFromGitHub {
owner = "haampie";
repo = "libtree";
rev = "v${version}";
sha256 = "sha256-j54fUwMkX4x4MwL8gMraguK9GqQRBjCC+W6ojFnQdHQ=";
};
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;
checkInputs = [ gtest ];
cmakeFlags = [ "-DLIBTREE_BUILD_TESTS=ON" ];
meta = with lib; {
description = "Tree ldd with an option to bundle dependencies into a single folder";
homepage = "https://github.com/haampie/libtree";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ prusnak rardiol ];
};
}

View File

@ -7343,6 +7343,8 @@ with pkgs;
libtins = callPackage ../development/libraries/libtins { };
libtree = callPackage ../development/tools/misc/libtree { };
libshout = callPackage ../development/libraries/libshout { };
libqb = callPackage ../development/libraries/libqb { };
@ -10015,6 +10017,8 @@ with pkgs;
telescope = callPackage ../applications/networking/browsers/telescope { };
termcolor = callPackage ../development/libraries/termcolor { };
termscp = callPackage ../tools/networking/termscp {
inherit (darwin.apple_sdk.frameworks) Foundation Security;
};
@ -16136,6 +16140,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
elfio = callPackage ../development/libraries/elfio { };
enchant1 = callPackage ../development/libraries/enchant/1.x.nix { };
enchant2 = callPackage ../development/libraries/enchant/2.x.nix { };