mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 08:14:19 +00:00
a9a25431c3
rrsync.meta inherits from rsync.meta, so #248417 had the effect of setting rrsync.meta.mainProgram to "rsync", which doesn’t exist: /nix/store/…-rrsync-3.3.0/bin/rsync: No such file or directory Re #298509
33 lines
732 B
Nix
33 lines
732 B
Nix
{ stdenv, python3, rsync }:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "rrsync";
|
|
inherit (rsync) version src;
|
|
|
|
buildInputs = [
|
|
rsync
|
|
(python3.withPackages (pythonPackages: with pythonPackages; [ braceexpand ]))
|
|
];
|
|
# Skip configure and build phases.
|
|
# We just want something from the support directory
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
inherit (rsync) patches;
|
|
|
|
postPatch = ''
|
|
substituteInPlace support/rrsync --replace /usr/bin/rsync ${rsync}/bin/rsync
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp support/rrsync $out/bin
|
|
chmod a+x $out/bin/rrsync
|
|
'';
|
|
|
|
meta = rsync.meta // {
|
|
description = "Helper to run rsync-only environments from ssh-logins";
|
|
mainProgram = "rrsync";
|
|
};
|
|
}
|