package: include dependencies in wrapper

This commit is contained in:
Jörg Thalheim 2022-12-09 15:03:50 +01:00
parent 8f7cb3c73b
commit b0a2740aca

View File

@ -1,8 +1,21 @@
{ stdenvNoCC }:
{ stdenvNoCC, makeWrapper, lib, openssh, git, nix, coreutils }:
let
runtimeDeps = [
openssh
git # for git flakes
nix
coreutils
];
in
stdenvNoCC.mkDerivation {
name = "nixos-remote";
src = ./.;
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
install -D -m755 nixos-remote $out/bin/nixos-remote
wrapProgram "$out/bin/nixos-remote" \
--prefix PATH : "${lib.makeBinPath runtimeDeps}"
'';
}