From 16d918ac65bd9bc6de8cf2b35e9389f767442d04 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 28 Dec 2025 16:55:12 -0600 Subject: install manpage --- hm-reposync.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hm-reposync.nix b/hm-reposync.nix index 83a1129..9a0a42a 100644 --- a/hm-reposync.nix +++ b/hm-reposync.nix @@ -177,7 +177,7 @@ in { ${lines (lib.mapAttrsToList (name: r: "${name}) ${fname name} ;;") repocfg)} -a|--all) all ;; ''; - src = pkgs.writeShellScriptBin "reposync" '' + reposyncSrc = pkgs.writeShellScriptBin "reposync" '' export PATH="${pkgs.git}/bin:$PATH" export PATH="${pkgs.stow}/bin:$PATH" ${builtins.readFile ./reposync-functions.sh} @@ -192,16 +192,17 @@ in { hm-reposync = pkgs.stdenv.mkDerivation rec { name = "hm-reposync"; - inherit src; + srcs = [reposyncSrc ./reposync.1]; dontUnpack = true; buildInputs = with pkgs; [git stow]; installPhase = '' - # TODO install manpage - mkdir -p $out/bin - cp $src/bin/reposync $out/bin + read src_bin src_man <<< "$srcs" # split srcs + mkdir -p $out/bin $out/share/man/man1 + cp $src_bin/bin/reposync $out/bin chmod +x $out/bin/reposync + cp $src_man $out/share/man/man1/reposync.1 ''; }; in lib.mkIf cfg.enable { -- cgit v1.2.3