Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 641f22e6e4b1
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 57c198236a6c
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Jan 16, 2021

  1. scponly: init at 4.8

    Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
    wmertens and SuperSandro2000 committed Jan 16, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    cole-h Cole Helbling
    Copy the full SHA
    cd0fa5a View commit details

Commits on Jan 17, 2021

  1. Merge pull request #109452 from wmertens/scponly

    scponly: init at 4.8
    wmertens authored Jan 17, 2021
    Copy the full SHA
    57c1982 View commit details
Showing with 62 additions and 0 deletions.
  1. +39 −0 pkgs/shells/scponly/default.nix
  2. +21 −0 pkgs/shells/scponly/scponly-fix-make.patch
  3. +2 −0 pkgs/top-level/all-packages.nix
39 changes: 39 additions & 0 deletions pkgs/shells/scponly/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{ stdenv, lib, fetchFromGitHub, openssh, debugLevel ? 0 }:

stdenv.mkDerivation {
pname = "scponly";
version = "4.8";

src = fetchFromGitHub {
owner = "scponly";
repo = "scponly";
rev = "d8ca58257b9905186aa5706f35813d5f80ea07c1";
sha256 = "U0K7lOp18ytNjh3KVFmc6vL+/tG4ETnwLEPQEhM4lXE=";
};

patches = [ ./scponly-fix-make.patch ];

buildInputs = [ openssh ];

# Add path to sftp-server so configure finds it
preConfigure = "export PATH=$PATH:${openssh}/libexec";

# chroot doesn't seem to work, so not enabling
# rsync could also be optionally enabled
configureFlags = [ "--enable-winscp-compat" ];

postInstall = lib.optionalString (debugLevel > 0) ''
mkdir -p $out/etc/scponly && echo ${
toString debugLevel
} > $out/etc/scponly/debuglevel
'';

passthru.shellPath = "/bin/scponly";

meta = with lib; {
description = "A shell that only permits scp and sftp-server";
homepage = "https://github.com/scponly/scponly";
license = with licenses; [ bsd2 ];
maintainers = with maintainers; [ wmertens ];
};
}
21 changes: 21 additions & 0 deletions pkgs/shells/scponly/scponly-fix-make.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -41,14 +41,14 @@
${INSTALL} -d ${DESTDIR}${bindir}
${INSTALL} -d ${DESTDIR}${mandir}/man8
${INSTALL} -d ${DESTDIR}${CONFDIR}
- ${INSTALL} -o 0 -g 0 scponly ${DESTDIR}${bindir}/scponly
- ${INSTALL} -o 0 -g 0 -m 0644 scponly.8 ${DESTDIR}${mandir}/man8/scponly.8
- ${INSTALL} -o 0 -g 0 -m 0644 debuglevel ${DESTDIR}${DEBUGFILE}
+ ${INSTALL} scponly ${DESTDIR}${bindir}/scponly
+ ${INSTALL} -m 0644 scponly.8 ${DESTDIR}${mandir}/man8/scponly.8
+ ${INSTALL} -m 0644 debuglevel ${DESTDIR}${DEBUGFILE}
if test "x${CHROOTED_NAME}" != "x"; then \
${INSTALL} -d ${DESTDIR}${sbindir}; \
rm -f ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \
cp scponly ${CHROOTED_NAME}; \
- ${INSTALL} -o 0 -g 0 -m 4755 ${CHROOTED_NAME} ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \
+ ${INSTALL} ${CHROOTED_NAME} ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \
fi

debuglevel:
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -9172,6 +9172,8 @@ in

pash = callPackage ../shells/pash { };

scponly = callPackage ../shells/scponly { };

tcsh = callPackage ../shells/tcsh { };

rush = callPackage ../shells/rush { };