nixos-configs/common/home/trash-d/trash-d.nix

32 lines
494 B
Nix
Raw Normal View History

2023-12-23 22:57:43 -05:00
{
trash-d-src,
2023-12-23 22:57:43 -05:00
stdenv,
dmd,
dub,
ronn,
...
}:
stdenv.mkDerivation {
name = "trash";
version = trash-d-src.shortRev;
2023-12-23 22:57:43 -05:00
src = trash-d-src;
2023-12-23 22:57:43 -05:00
buildInputs = [dub dmd ronn];
buildPhase = ''
# https://github.com/svanderburg/node2nix/issues/217#issuecomment-751311272
export HOME=$(mktemp -d)
dub build
'';
installPhase = ''
mkdir -p $out/bin $out/man/man1
cp -a ./build/trash $out/bin/
ronn --roff --pipe MANUAL.md > $out/man/man1/trash.1
'';
}