nixpkgs/pkgs/by-name/li/libtree/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Normal View History

2021-12-04 10:11:21 +00:00
{ lib
, stdenv
, fetchFromGitHub
2023-07-02 13:04:15 +00:00
, testers
, libtree
, runCommand
, coreutils
, dieHook
2021-12-04 10:11:21 +00:00
}:
2023-07-02 13:04:15 +00:00
stdenv.mkDerivation (finalAttrs: {
2021-12-04 10:11:21 +00:00
pname = "libtree";
2023-07-02 13:04:15 +00:00
version = "3.1.1";
2021-12-04 10:11:21 +00:00
src = fetchFromGitHub {
owner = "haampie";
repo = "libtree";
2023-07-02 13:04:15 +00:00
rev = "v${finalAttrs.version}";
hash = "sha256-q3JtQ9AxoP0ma9K96cC3gf6QmQ1FbS7T7I59qhkwbMk=";
2021-12-04 10:11:21 +00:00
};
makeFlags = [ "PREFIX=$(out)" ];
2021-12-04 10:11:21 +00:00
2023-07-02 13:04:15 +00:00
# Fails at https://github.com/haampie/libtree/blob/v3.1.1/tests/07_origin_is_relative_to_symlink_location_not_realpath/Makefile#L28
doCheck = false;
passthru.tests = {
version = testers.testVersion {
package = libtree;
command = "libtree --version";
version = finalAttrs.version;
};
checkCoreUtils = runCommand "${finalAttrs.pname}-ls-test" {
nativeBuildInputs = [ finalAttrs.finalPackage dieHook ];
} ''
libtree ${coreutils}/bin/ls > $out || die "libtree failed to show dependencies."
[ -s $out ]
'';
};
2021-12-04 10:11:21 +00:00
meta = with lib; {
description = "Tree ldd with an option to bundle dependencies into a single folder";
mainProgram = "libtree";
2021-12-04 10:11:21 +00:00
homepage = "https://github.com/haampie/libtree";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ prusnak rardiol ];
};
2023-07-02 13:04:15 +00:00
})