depot/third_party/nixpkgs/pkgs/by-name/yt/ytree/package.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

46 lines
1 KiB
Nix

{ lib
, stdenv
, fetchurl
, ncurses
, readline
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ytree";
version = "2.06";
src = fetchurl {
url = "https://han.de/~werner/ytree-${finalAttrs.version}.tar.gz";
hash = "sha256-QRqI779ZnnytVUC7A7Zt0zyWexRwBnp+CVQcNvnvWeY=";
};
patches = [
# Two fixups (because diff files can't be smaller):
# - Create PREFIX instead of using DESTDIR
# - use gzip without timestamp, to improve reproducibility
./0001-use-prefix-and-gzip-n.diff
];
buildInputs = [
ncurses
readline
];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installFlags = [ "PREFIX=${placeholder "out"}" ];
preInstall = ''
mkdir -p $out/bin $out/share/man/man1
'';
meta = {
homepage = "https://www.han.de/~werner/ytree.html";
description = "A curses-based file manager similar to DOS Xtree(TM)";
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "ytree";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
})
# TODO: X11 support