refactor(pkgs): improve versioning

This commit is contained in:
matt1432 2024-06-13 22:27:54 -04:00
parent 927a3fbfb1
commit d17a69372a
29 changed files with 188 additions and 135 deletions
common/home/trash-d

View file

@ -1,7 +1,9 @@
{pkgs, ...} @ inputs: let
trash = pkgs.callPackage ./trash-d.nix inputs;
in {
home.packages = [trash];
{
pkgs,
self,
...
}: {
home.packages = [self.packages.${pkgs.system}.trash-d];
programs.bash.shellAliases.rm = "trash";
}

View file

@ -1,31 +0,0 @@
{
trash-d-src,
stdenv,
dmd,
dub,
ronn,
...
}:
stdenv.mkDerivation {
name = "trash";
version = trash-d-src.shortRev;
src = trash-d-src;
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
'';
}