tree: cleanup, take maintainership
This commit is contained in:
parent
db93862a2c
commit
378659148d
1 changed files with 26 additions and 28 deletions
|
@ -4,22 +4,20 @@ let
|
||||||
# These settings are found in the Makefile, but there seems to be no
|
# These settings are found in the Makefile, but there seems to be no
|
||||||
# way to select one ore the other setting other than editing the file
|
# way to select one ore the other setting other than editing the file
|
||||||
# manually, so we have to duplicate the know how here.
|
# manually, so we have to duplicate the know how here.
|
||||||
systemFlags = with stdenv;
|
systemFlags = lib.optionalString stdenv.isDarwin ''
|
||||||
if isDarwin then ''
|
CFLAGS="-O2 -Wall -fomit-frame-pointer"
|
||||||
CFLAGS="-O2 -Wall -fomit-frame-pointer"
|
LDFLAGS=
|
||||||
LDFLAGS=
|
EXTRA_OBJS=strverscmp.o
|
||||||
EXTRA_OBJS=strverscmp.o
|
'' + lib.optionalString stdenv.isCygwin ''
|
||||||
'' else if isCygwin then ''
|
CFLAGS="-O2 -Wall -fomit-frame-pointer -DCYGWIN"
|
||||||
CFLAGS="-O2 -Wall -fomit-frame-pointer -DCYGWIN"
|
LDFLAGS=-s
|
||||||
LDFLAGS=-s
|
TREE_DEST=tree.exe
|
||||||
TREE_DEST=tree.exe
|
EXTRA_OBJS=strverscmp.o
|
||||||
EXTRA_OBJS=strverscmp.o
|
'' + lib.optionalString (stdenv.isFreeBSD || stdenv.isOpenBSD) ''
|
||||||
'' else if (isFreeBSD || isOpenBSD) then ''
|
CFLAGS="-O2 -Wall -fomit-frame-pointer"
|
||||||
CFLAGS="-O2 -Wall -fomit-frame-pointer"
|
LDFLAGS=-s
|
||||||
LDFLAGS=-s
|
EXTRA_OBJS=strverscmp.o
|
||||||
EXTRA_OBJS=strverscmp.o
|
''; # use linux flags by default
|
||||||
'' else
|
|
||||||
""; # use linux flags by default
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tree";
|
pname = "tree";
|
||||||
|
@ -30,27 +28,27 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi";
|
sha256 = "1hmpz6k0mr6salv0nprvm1g0rdjva1kx03bdf1scw8a38d5mspbi";
|
||||||
};
|
};
|
||||||
|
|
||||||
configurePhase = ''
|
preConfigure = ''
|
||||||
sed -i Makefile -e 's|^OBJS=|OBJS=$(EXTRA_OBJS) |'
|
sed -i Makefile -e 's|^OBJS=|OBJS=$(EXTRA_OBJS) |'
|
||||||
makeFlagsArray=(
|
|
||||||
prefix=$out
|
|
||||||
MANDIR=$out/share/man/man1
|
|
||||||
${systemFlags}
|
|
||||||
CC="$CC"
|
|
||||||
)
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
makeFlags = [
|
||||||
|
"prefix=${placeholder "out"}"
|
||||||
|
"MANDIR=${placeholder "out"}/share/man/man1"
|
||||||
|
"CC=$CC"
|
||||||
|
systemFlags
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
homepage = "http://mama.indstate.edu/users/ice/tree/";
|
homepage = "http://mama.indstate.edu/users/ice/tree/";
|
||||||
description = "Command to produce a depth indented directory listing";
|
description = "Command to produce a depth indented directory listing";
|
||||||
license = lib.licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Tree is a recursive directory listing command that produces a
|
Tree is a recursive directory listing command that produces a
|
||||||
depth indented listing of files, which is colorized ala dircolors if
|
depth indented listing of files, which is colorized ala dircolors if
|
||||||
the LS_COLORS environment variable is set and output is to tty.
|
the LS_COLORS environment variable is set and output is to tty.
|
||||||
'';
|
'';
|
||||||
|
platforms = platforms.all;
|
||||||
platforms = lib.platforms.all;
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue