mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, testers
|
|
, libtree
|
|
, runCommand
|
|
, coreutils
|
|
, dieHook
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libtree";
|
|
version = "3.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "haampie";
|
|
repo = "libtree";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-q3JtQ9AxoP0ma9K96cC3gf6QmQ1FbS7T7I59qhkwbMk=";
|
|
};
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
# 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 ]
|
|
'';
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tree ldd with an option to bundle dependencies into a single folder";
|
|
mainProgram = "libtree";
|
|
homepage = "https://github.com/haampie/libtree";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ prusnak rardiol ];
|
|
};
|
|
})
|