NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.93k stars 13.95k forks source link

`dropbear`: add option to build `scp` utility #135849

Closed fogti closed 2 years ago

fogti commented 3 years ago

dropbear is already packaged, but I needed the following to be able to correctly build the scp utility:

with pkgs;
   (dropbear.overrideAttrs (old: {
      preConfigure = old.preConfigure + ''
        makeFlagsArray=( "$makeFlags" "PROGRAMS=dbclient scp" )
        makeFlags=""
      '';
      CFLAGS = old.CFLAGS + " -DDROPBEAR_PATH_SSH_PROGRAM=\\\"${placeholder "out"}/bin/dbclient\\\"";
    }))

I would propose adding an option withSCP ? false, which adds scp to the default PROGRAMS list dropbear dbclient dropbearkey dropbearconvert, and also modifies CFLAGS to include the fix of DROPBEAR_PATH_SSH_PROGRAM. It might be a good idea to also mark dropbear as lowPrio to prevent accidental conflicts with openssh.

AndersonTorres commented 3 years ago

What about opening a PR yourself?

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

fogti commented 2 years ago

still wanted