lol

scponly: init at 4.8

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

+62
+39
pkgs/shells/scponly/default.nix
··· 1 + { stdenv, lib, fetchFromGitHub, openssh, debugLevel ? 0 }: 2 + 3 + stdenv.mkDerivation { 4 + pname = "scponly"; 5 + version = "4.8"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "scponly"; 9 + repo = "scponly"; 10 + rev = "d8ca58257b9905186aa5706f35813d5f80ea07c1"; 11 + sha256 = "U0K7lOp18ytNjh3KVFmc6vL+/tG4ETnwLEPQEhM4lXE="; 12 + }; 13 + 14 + patches = [ ./scponly-fix-make.patch ]; 15 + 16 + buildInputs = [ openssh ]; 17 + 18 + # Add path to sftp-server so configure finds it 19 + preConfigure = "export PATH=$PATH:${openssh}/libexec"; 20 + 21 + # chroot doesn't seem to work, so not enabling 22 + # rsync could also be optionally enabled 23 + configureFlags = [ "--enable-winscp-compat" ]; 24 + 25 + postInstall = lib.optionalString (debugLevel > 0) '' 26 + mkdir -p $out/etc/scponly && echo ${ 27 + toString debugLevel 28 + } > $out/etc/scponly/debuglevel 29 + ''; 30 + 31 + passthru.shellPath = "/bin/scponly"; 32 + 33 + meta = with lib; { 34 + description = "A shell that only permits scp and sftp-server"; 35 + homepage = "https://github.com/scponly/scponly"; 36 + license = with licenses; [ bsd2 ]; 37 + maintainers = with maintainers; [ wmertens ]; 38 + }; 39 + }
+21
pkgs/shells/scponly/scponly-fix-make.patch
··· 1 + --- a/Makefile.in 2 + +++ b/Makefile.in 3 + @@ -41,14 +41,14 @@ 4 + ${INSTALL} -d ${DESTDIR}${bindir} 5 + ${INSTALL} -d ${DESTDIR}${mandir}/man8 6 + ${INSTALL} -d ${DESTDIR}${CONFDIR} 7 + - ${INSTALL} -o 0 -g 0 scponly ${DESTDIR}${bindir}/scponly 8 + - ${INSTALL} -o 0 -g 0 -m 0644 scponly.8 ${DESTDIR}${mandir}/man8/scponly.8 9 + - ${INSTALL} -o 0 -g 0 -m 0644 debuglevel ${DESTDIR}${DEBUGFILE} 10 + + ${INSTALL} scponly ${DESTDIR}${bindir}/scponly 11 + + ${INSTALL} -m 0644 scponly.8 ${DESTDIR}${mandir}/man8/scponly.8 12 + + ${INSTALL} -m 0644 debuglevel ${DESTDIR}${DEBUGFILE} 13 + if test "x${CHROOTED_NAME}" != "x"; then \ 14 + ${INSTALL} -d ${DESTDIR}${sbindir}; \ 15 + rm -f ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \ 16 + cp scponly ${CHROOTED_NAME}; \ 17 + - ${INSTALL} -o 0 -g 0 -m 4755 ${CHROOTED_NAME} ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \ 18 + + ${INSTALL} ${CHROOTED_NAME} ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \ 19 + fi 20 + 21 + debuglevel:
+2
pkgs/top-level/all-packages.nix
··· 9168 9168 9169 9169 pash = callPackage ../shells/pash { }; 9170 9170 9171 + scponly = callPackage ../shells/scponly { }; 9172 + 9171 9173 tcsh = callPackage ../shells/tcsh { }; 9172 9174 9173 9175 rush = callPackage ../shells/rush { };