push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchFrom9Front,
unstableGitUpdater,
byacc,
installShellFiles,
coreutils,
# for tests only
rc-9front,
runCommand,
nawk,
}:
stdenv.mkDerivation {
pname = "rc-9front";
version = "0-unstable-2025-06-14";
src = fetchFrom9Front {
domain = "shithub.us";
owner = "cinap_lenrek";
repo = "rc";
rev = "3e907e648d7263c159c604dc51aa8ca5d5fcd7f8";
hash = "sha256-XucMQXlGdMcs3piMKRgmQNhuirSQP9mKmXbfTWbuePg=";
};
strictDeps = true;
nativeBuildInputs = [
byacc
installShellFiles
];
enableParallelBuilding = true;
# Rc bootstraps the new $path by hardcoding a common list
# of binary locations common to most POSIX-y systems.
# On NixOS the average $PATH is a lot more involved and
# as such the resulting environment that rcmain.unix dumps you
# into is not particularly useful. This patch instead makes
# rc bootstrap the new $path using the existing $PATH.
postPatch = ''
substituteInPlace ./rcmain.unix --replace-fail 'path=(. /bin /usr/bin /usr/local/bin)' 'path=`:{${coreutils}/bin/env echo -n $PATH}'
'';
makeFlags = [ "PREFIX=$(out)" ];
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin/ rc
installManPage rc.1
mkdir -p $out/lib
install -m644 rcmain.unix $out/lib/rcmain
runHook postInstall
'';
passthru = {
shellPath = "/bin/rc";
updateScript = unstableGitUpdater { shallowClone = false; };
tests = {
simple = runCommand "rc-test" { } ''
${lib.getExe rc-9front} -c 'nl=`{echo} && \
res=`$nl{for(i in `{seq 1 10}) echo $i} && \
echo -n $res' >$out
[ "$(wc -l $out | ${lib.getExe nawk} '{ print $1 }' )" = 10 ]
[ "$(${lib.getExe nawk} '{ a=a+$1 } END{ print a }' < $out)" = "$((10+9+8+7+6+5+4+3+2+1))" ]
'';
path = runCommand "rc-path" { } ''
PATH='${coreutils}/bin:/a:/b:/c' ${lib.getExe rc-9front} -c 'echo $path(2-)' >$out
[ '/a /b /c' = "$(cat $out)" ]
'';
};
};
meta = {
description = "9front shell";
longDescription = "unix port of 9front rc";
homepage = "http://shithub.us/cinap_lenrek/rc/HEAD/info.html";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ moody ];
mainProgram = "rc";
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,109 @@
{
lib,
stdenv,
fetchFromGitHub,
pkgsStatic,
byacc,
ed,
ncurses,
readline,
installShellFiles,
historySupport ? true,
readlineSupport ? true,
lineEditingLibrary ?
if (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isStatic) then "null" else "readline",
}:
assert lib.elem lineEditingLibrary [
"null"
"edit"
"editline"
"readline"
"vrl"
];
assert
!(lib.elem lineEditingLibrary [
"edit"
"editline"
"vrl"
]); # broken
assert (lineEditingLibrary == "readline") -> readlineSupport;
stdenv.mkDerivation (finalAttrs: {
pname = "rc";
version = "unstable-2023-06-14";
src = fetchFromGitHub {
owner = "rakitzis";
repo = "rc";
rev = "4aaba1a9cb9fdbb8660696a87850836ffdb09599";
hash = "sha256-Yql3mt7hTO2W7wTfPje+X2zBGTHiNXGGXYORJewJIM8=";
};
outputs = [
"out"
"man"
];
# TODO: think on a less ugly fixup
postPatch = ''
ed -v -s Makefile << EOS
# - remove reference to now-inexistent git index file
/version.h:/ s| .git/index||
# - manually insert the git revision string
/v=/ c
${"\t"}v=${builtins.substring 0 7 finalAttrs.src.rev}
.
/\.git\/index:/ d
w
q
EOS
'';
nativeBuildInputs = [
byacc
ed
installShellFiles
];
buildInputs = [
ncurses
]
++ lib.optionals readlineSupport [
readline
];
strictDeps = true;
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"PREFIX=${placeholder "out"}"
"MANPREFIX=${placeholder "man"}/share/man"
"CPPFLAGS=\"-DSIGCLD=SIGCHLD\""
"EDIT=${lineEditingLibrary}"
];
buildFlags = [
"all"
]
++ lib.optionals historySupport [
"history"
];
postInstall = lib.optionalString historySupport ''
installManPage history.1
'';
passthru = {
shellPath = "/bin/rc";
tests.static = pkgsStatic.rc;
};
meta = {
homepage = "https://github.com/rakitzis/rc";
description = "Plan 9 shell";
license = [ lib.licenses.zlib ];
mainProgram = "rc";
maintainers = with lib.maintainers; [ ramkromberg ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,71 @@
{
lib,
python3Packages,
fetchFromGitHub,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "rclip";
version = "2.0.8";
pyproject = true;
src = fetchFromGitHub {
owner = "yurijmikhalevich";
repo = "rclip";
tag = "v${version}";
hash = "sha256-ScNyy5qWDskKgqxjfRU7y8WBCdThXTjlE3x0oIa8fhU=";
};
build-system = with python3Packages; [
poetry-core
];
dependencies = with python3Packages; [
numpy
open-clip-torch
pillow
requests
torch
torchvision
tqdm
rawpy
];
pythonRelaxDeps = [
"numpy"
"open_clip_torch"
"pillow"
"rawpy"
"torch"
"torchvision"
];
pythonImportsCheck = [ "rclip" ];
nativeCheckInputs = [
versionCheckHook
]
++ (with python3Packages; [ pytestCheckHook ]);
versionCheckProgramArg = "--version";
disabledTestPaths = [
# requires network
"tests/e2e/test_rclip.py"
];
disabledTests = [
# requires network
"test_text_model_produces_the_same_vector_as_the_main_model"
"test_loads_text_model_when_text_processing_only_requested_and_checkpoint_exists"
"test_loads_full_model_when_text_processing_only_requested_and_checkpoint_doesnt_exist"
];
meta = {
description = "AI-Powered Command-Line Photo Search Tool";
homepage = "https://github.com/yurijmikhalevich/rclip";
changelog = "https://github.com/yurijmikhalevich/rclip/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ iynaix ];
mainProgram = "rclip";
};
}

View File

@@ -0,0 +1,89 @@
{
lib,
fetchFromGitHub,
rustPlatform,
cargo-tauri,
nodejs,
npmHooks,
fetchNpmDeps,
pkg-config,
wrapGAppsHook3,
openssl,
webkitgtk_4_1,
glib-networking,
libappindicator,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rclone-ui";
version = "2.2.0";
src = fetchFromGitHub {
owner = "rclone-ui";
repo = "rclone-ui";
tag = "v${finalAttrs.version}";
hash = "sha256-gwZXI501lE3Tm9M8k6a2NJCsvbiPB3Y4yhhr4gkpkY4=";
};
npmDeps = fetchNpmDeps {
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
inherit (finalAttrs) src;
forceGitDeps = true;
hash = "sha256-OkPVPT4JBbkVcfGtSs6oi+VFA3sxp1b6fVr68ILtnPU=";
};
cargoRoot = "src-tauri";
buildAndTestSubdir = finalAttrs.cargoRoot;
cargoHash = "sha256-8RK1rrGyxRNCTARlYUJNXWaH9F/3hV31uyNXjvWJaFU=";
# Disable tauri bundle updater, can be removed when #389107 is merged
patches = [ ./remove_updater.patch ];
postPatch = ''
substituteInPlace src-tauri/tauri.conf.json \
--replace-fail '"mainBinaryName": "Rclone UI"' '"mainBinaryName": "${finalAttrs.pname}"'
substituteInPlace src-tauri/Cargo.toml \
--replace-fail 'name = "app"' 'name = "${finalAttrs.pname}"'
'';
nativeBuildInputs = [
npmHooks.npmConfigHook
nodejs
cargo-tauri.hook
pkg-config
wrapGAppsHook3
];
buildInputs = [
openssl
webkitgtk_4_1
glib-networking
libappindicator
];
dontWrapGApps = true;
postInstall = ''
wrapProgram $out/bin/rclone-ui \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libappindicator ]}
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Cross-platform desktop GUI for rclone & S3";
homepage = "https://github.com/rclone-ui/rclone-ui";
downloadPage = "https://github.com/rclone-ui/rclone-ui";
changelog = "https://github.com/rclone-ui/rclone-ui/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ genga898 ];
mainProgram = "rclone-ui";
};
})

View File

@@ -0,0 +1,34 @@
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 04ea191..72d178d 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -83,7 +83,6 @@ pub fn run() {
let mut app = tauri::Builder::default()
.plugin(tauri_plugin_clipboard_manager::init())
- .plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_notification::init())
.plugin(tauri_plugin_process::init())
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 8b1c89f..1705861 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -86,16 +86,9 @@
"installMode": "both"
},
"signCommand": "trusted-signing-cli -e https://eus.codesigning.azure.net -a sign-1 -c Sign1 -d Rclone %1"
- },
- "createUpdaterArtifacts": true
+ }
},
"plugins": {
- "updater": {
- "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIyNDFENEZGNjFDNTBGOEYKUldTUEQ4VmgvOVJCSWhVZmw0enhmcW1kWFk3TS9mMzBDRjVEZWdxKzQ5ZmRhTlYvT2gvdFNMbE8K",
- "endpoints": [
- "https://github.com/rclone-ui/rclone-ui/releases/latest/download/latest.json"
- ]
- },
"fs": {
"requireLiteralLeadingDot": false
}

View File

@@ -0,0 +1,48 @@
diff --git a/bin/lsrc.in b/bin/lsrc.in
index fcf5fbe..119d659 100755
--- a/bin/lsrc.in
+++ b/bin/lsrc.in
@@ -1,6 +1,6 @@
#!@SHELL@
-: ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+RCM_LIB=@rcm@/share/rcm
. "$RCM_LIB/rcm.sh"
pushdir() {
diff --git a/bin/mkrc.in b/bin/mkrc.in
index da22a63..a6bb0ad 100755
--- a/bin/mkrc.in
+++ b/bin/mkrc.in
@@ -1,6 +1,6 @@
#!@SHELL@
-: ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+RCM_LIB=@rcm@/share/rcm
. "$RCM_LIB/rcm.sh"
destination() {
diff --git a/bin/rcdn.in b/bin/rcdn.in
index ae7aad8..c210599 100755
--- a/bin/rcdn.in
+++ b/bin/rcdn.in
@@ -1,6 +1,6 @@
#!@SHELL@
-: ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+RCM_LIB=@rcm@/share/rcm
. "$RCM_LIB/rcm.sh"
remove_link() {
diff --git a/bin/rcup.in b/bin/rcup.in
index bdae664..2076f53 100755
--- a/bin/rcup.in
+++ b/bin/rcup.in
@@ -1,6 +1,6 @@
#!@SHELL@
-: ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+RCM_LIB=@rcm@/share/rcm
. "$RCM_LIB/rcm.sh"
print_ln_v() {

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "rcm";
version = "1.3.6";
src = fetchurl {
url = "https://thoughtbot.github.io/rcm/dist/rcm-${version}.tar.gz";
sha256 = "sha256-9P37xFHR+1dkUxKQogKgqHH2uBujwBprdsSUNchQgKU=";
};
patches = [ ./fix-rcmlib-path.patch ];
postPatch = ''
for f in bin/*.in; do
substituteInPlace $f --subst-var-by rcm $out
done
'';
meta = with lib; {
homepage = "https://github.com/thoughtbot/rcm";
description = "Management Suite for Dotfiles";
license = licenses.bsd3;
maintainers = with maintainers; [
malyn
];
platforms = with platforms; unix;
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
uutils-coreutils,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rcodesign";
version = "0.29.0";
src = fetchFromGitHub {
owner = "indygreg";
repo = "apple-platform-rs";
tag = "apple-codesign/${version}";
hash = "sha256-NyO0HkldXh94Y16E+SX1VE/OOx0zgO6VYoRLJrEQUm0=";
};
cargoHash = "sha256-KJsTOviCFZ/1eNJLM4+QmK8h6laxN1POl7YMJyu9/g8=";
cargoBuildFlags = [
# Only build the binary we want
"--bin=rcodesign"
];
checkFlags = [
# Does network IO
"--skip=cli_tests"
"--skip=ticket_lookup::test::lookup_ticket"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# These tests require Xcode to be installed
"--skip=parsed_sdk::test::find_all_sdks"
"--skip=simple_sdk::test::find_all_sdks"
"--skip=test::find_all_platform_directories"
# Error: Io(Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" })
"--skip=test::find_system_xcode_applications"
"--skip=test::find_system_xcode_developer_directories"
];
# Set up uutils-coreutils for cli_tests. Without this, it will be installed with `cargo install`, which will fail
# due to the lack of network access in the build environment.
preCheck = ''
coreutils_dir=''${CARGO_TARGET_DIR:-"$(pwd)/target"}/${stdenv.hostPlatform.rust.cargoShortTarget}/coreutils/bin
install -m 755 -d "$coreutils_dir"
ln -s '${lib.getExe' uutils-coreutils "uutils-coreutils"}' "$coreutils_dir/coreutils"
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Cross-platform CLI interface to interact with Apple code signing";
mainProgram = "rcodesign";
longDescription = ''
rcodesign provides various commands to interact with Apple signing,
including signing and notarizing binaries, generating signing
certificates, and verifying existing signed binaries.
For more information, refer to the [documentation](https://gregoryszorc.com/docs/apple-codesign/stable/apple_codesign_rcodesign.html).
'';
homepage = "https://github.com/indygreg/apple-platform-rs";
changelog = "https://github.com/indygreg/apple-platform-rs/releases/tag/apple-codesign%2F${version}";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ euank ];
};
}

View File

@@ -0,0 +1,33 @@
{
buildGoModule,
fetchFromGitHub,
lib,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "rcon-cli";
version = "1.7.2";
src = fetchFromGitHub {
owner = "itzg";
repo = "rcon-cli";
tag = finalAttrs.version;
hash = "sha256-wog4nnXITV5p2lzfuO9tB//B87nh8KGpsCfSalt8WvE=";
};
vendorHash = "sha256-vD+i3vMInErO0MpIRgsVe0Fl6HuFIwUS8xKHdZ7lxVM=";
subPackages = [ "." ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Little RCON cli based on james4k's RCON library for golang";
homepage = "https://github.com/itzg/rcon-cli";
changelog = "https://github.com/itzg/rcon-cli/releases/tag/${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
link00000000
];
mainProgram = "rcon-cli";
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
glib,
libbsd,
check,
pcre,
}:
stdenv.mkDerivation rec {
pname = "rcon";
version = "0.6";
src = fetchFromGitHub {
owner = "n0la";
repo = "rcon";
rev = version;
sha256 = "sha256-bHm6JeWmpg42VZQXikHl+BMx9zimRLBQWemTqOxyLhw=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
glib
libbsd
check
pcre
];
meta = with lib; {
homepage = "https://github.com/n0la/rcon";
description = "Source RCON client for command line";
maintainers = with maintainers; [ f4814n ];
platforms = with platforms; linux ++ darwin;
license = licenses.bsd2;
mainProgram = "rcon";
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage {
version = "0.1.4";
pname = "rconc";
src = fetchFromGitHub {
owner = "klemens";
repo = "rconc";
rev = "11def656970b9ccf35c40429b5c599a4de7b28fc";
sha256 = "sha256-6Bff9NnG1ZEQhntzH5Iq0XEbJBKdwcb0BOn8nCkeWTY=";
};
cargoHash = "sha256-fkGSIPaq3SvbA9iP10sVb7gtBxo7XmHw+fz0Gt8AMXo=";
meta = with lib; {
description = "Simple cross-platform RCON client written in rust";
homepage = "https://github.com/klemens/rconc";
license = licenses.gpl3Only;
mainProgram = "rconc";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "rcp";
version = "0.18.0";
src = fetchFromGitHub {
owner = "wykurz";
repo = "rcp";
rev = "v${version}";
hash = "sha256-hAm9dHxsIR5cJlZHvSUcj3FXBIF9g7klJ2gSg9vVQcE=";
};
cargoHash = "sha256-iULpW3DiEUmKz5OKUeWfYNAfhrEECd2XijtYqfcbjB0=";
RUSTFLAGS = "--cfg tokio_unstable";
checkFlags = [
# these tests set setuid permissions on a test file (3oXXX) which doesn't work in a sandbox
"--skip=copy::copy_tests::check_default_mode"
"--skip=test_weird_permissions"
"--skip=test_edge_case_special_permissions"
# these tests require network access to determine local IP address
"--skip=test_remote"
];
meta = {
changelog = "https://github.com/wykurz/rcp/releases/tag/v${version}";
description = "Tools to efficiently copy, remove and link large filesets";
homepage = "https://github.com/wykurz/rcp";
license = with lib.licenses; [ mit ];
mainProgram = "rcp";
maintainers = with lib.maintainers; [ wykurz ];
# Building procfs on an for a unsupported platform. Currently only linux and android are supported
# (Your current target_os is macos)
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchurl,
buildPackages,
diffutils,
ed,
lzip,
}:
stdenv.mkDerivation rec {
pname = "rcs";
version = "5.10.1";
src = fetchurl {
url = "mirror://gnu/rcs/${pname}-${version}.tar.lz";
sha256 = "sha256-Q93+EHJKi4XiRo9kA7YABzcYbwHmDgvWL95p2EIjTMU=";
};
ac_cv_path_ED = "${ed}/bin/ed";
DIFF = "${diffutils}/bin/diff";
DIFF3 = "${diffutils}/bin/diff3";
disallowedReferences = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
buildPackages.diffutils
buildPackages.ed
];
env.NIX_CFLAGS_COMPILE = "-std=c99";
hardeningDisable = lib.optional stdenv.cc.isClang "format";
nativeBuildInputs = [ lzip ];
meta = {
homepage = "https://www.gnu.org/software/rcs/";
description = "Revision control system";
longDescription = ''
The GNU Revision Control System (RCS) manages multiple revisions of
files. RCS automates the storing, retrieval, logging,
identification, and merging of revisions. RCS is useful for text
that is revised frequently, including source code, programs,
documentation, graphics, papers, and form letters.
'';
license = lib.licenses.gpl3Plus;
maintainers = [ ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchurl,
musl-fts,
}:
stdenv.mkDerivation {
pname = "rcshist";
version = "1.04";
configureFlags = lib.optional stdenv.hostPlatform.isMusl "LIBS=-lfts";
buildInputs = lib.optional stdenv.hostPlatform.isMusl musl-fts;
src = fetchurl {
url = "https://web.archive.org/web/20220508220019/https://invisible-island.net/datafiles/release/rcshist.tar.gz";
sha256 = "01ab3xwgm934lxr8bm758am3vxwx4hxx7cc9prbgqj5nh30vdg1n";
};
meta = {
description = "Utitity to display complete revision history of a set of RCS files";
homepage = "https://invisible-island.net/rcshist/rcshist.html";
license = lib.licenses.bsd2;
maintainers = [ lib.maintainers.kaction ];
platforms = lib.platforms.unix;
mainProgram = "rcshist";
};
}

View File

@@ -0,0 +1,140 @@
diff '--color=auto' -ruN a/src/model/transport.py b/src/model/transport.py
--- a/src/model/transport.py 2025-08-27 17:12:23.761436314 +0200
+++ b/src/model/transport.py 2025-08-27 17:17:35.723006746 +0200
@@ -105,7 +105,6 @@
MSG_NAMES,
)
from paramiko.compress import ZlibCompressor, ZlibDecompressor
-from paramiko.dsskey import DSSKey
from paramiko.ed25519key import Ed25519Key
from paramiko.kex_curve25519 import KexCurve25519
from paramiko.kex_gex import KexGex, KexGexSHA256
@@ -117,7 +116,6 @@
from paramiko.message import Message
from paramiko.packet import Packetizer, NeedRekeyException
from paramiko.primes import ModulusPack
-from paramiko.py3compat import string_types, long, byte_ord, b, input, PY2
from paramiko.rsakey import RSAKey
from paramiko.ecdsakey import ECDSAKey
from paramiko.server import ServerInterface
@@ -128,7 +126,7 @@
ChannelException,
ProxyCommandFailure,
)
-from paramiko.util import retry_on_signal, ClosingContextManager, clamp_value
+from paramiko.util import ClosingContextManager, clamp_value
# for thread cleanup
@@ -192,7 +190,6 @@
"ecdsa-sha2-nistp384",
"ecdsa-sha2-nistp521",
"ssh-rsa",
- "ssh-dss",
)
_preferred_kex = (
"ecdh-sha2-nistp256",
@@ -273,8 +270,6 @@
_key_info = {
"ssh-rsa": RSAKey,
"ssh-rsa-cert-v01@openssh.com": RSAKey,
- "ssh-dss": DSSKey,
- "ssh-dss-cert-v01@openssh.com": DSSKey,
"ecdsa-sha2-nistp256": ECDSAKey,
"ecdsa-sha2-nistp256-cert-v01@openssh.com": ECDSAKey,
"ecdsa-sha2-nistp384": ECDSAKey,
@@ -396,7 +391,7 @@
self.active = False
self.hostname = None
- if isinstance(sock, string_types):
+ if isinstance(sock, str):
# convert "host:port" into (host, port)
hl = sock.split(":", 1)
self.hostname = hl[0]
@@ -419,7 +414,7 @@
sock = socket.socket(af, socket.SOCK_STREAM)
sock.settimeout(1)
try:
- retry_on_signal(lambda: sock.connect((hostname, port)))
+ sock.connect((hostname, port))
except socket.error as e:
reason = str(e)
else:
@@ -542,7 +537,7 @@
"""
Returns a string representation of this object, for debugging.
"""
- id_ = hex(long(id(self)) & xffffffff)
+ id_ = hex(int(id(self)) & xffffffff)
out = "<paramiko.Transport at {}".format(id_)
if not self.active:
out += " (unconnected)"
@@ -749,11 +744,11 @@
as a server, the host key is used to sign certain packets during the
SSH2 negotiation, so that the client can trust that we are who we say
we are. Because this is used for signing, the key must contain private
- key info, not just the public half. Only one key of each type (RSA or
- DSS) is kept.
+ key info, not just the public half. Only one key of each type (i.e.
+ RSA) is kept.
:param .PKey key:
- the host key to add, usually an `.RSAKey` or `.DSSKey`.
+ the host key to add, usually an `.RSAKey`.
"""
self.server_key_dict[key.get_name()] = key
@@ -763,7 +758,7 @@
client, this method will return the negotiated host key. If only one
type of host key was set with `add_server_key`, that's the only key
that will ever be returned. But in cases where you have set more than
- one type of host key (for example, an RSA key and a DSS key), the key
+ one type of host key (for example, an RSA key and another key), the key
type will be negotiated by the client, and this method will return the
key of the type agreed on. If the host key has not been negotiated
yet, ``None`` is returned. In client mode, the behavior is undefined.
@@ -1123,7 +1118,7 @@
m = Message()
m.add_byte(cMSG_IGNORE)
if byte_count is None:
- byte_count = (byte_ord(os.urandom(1)) % 32) + 10
+ byte_count = (os.urandom(1) % 32) + 10
m.add_bytes(os.urandom(byte_count))
self._send_user_message(m)
@@ -1802,7 +1797,7 @@
def stop_thread(self):
self.active = False
self.packetizer.close()
- if PY2:
+ if False:
# Original join logic; #520 doesn't appear commonly present under
# Python 2.
while self.is_alive() and self is not threading.current_thread():
@@ -1909,7 +1904,7 @@
m = Message()
m.add_mpint(self.K)
m.add_bytes(self.H)
- m.add_byte(b(id))
+ m.add_byte(id.encode("utf8"))
m.add_bytes(self.session_id)
# Fallback to SHA1 for kex engines that fail to specify a hex
# algorithm, or for e.g. transport tests that don't run kexinit.
@@ -2037,14 +2032,14 @@
# active=True occurs before the thread is launched, to avoid a race
_active_threads.append(self)
- tid = hex(long(id(self)) & xffffffff)
+ tid = hex(int(id(self)) & xffffffff)
if self.server_mode:
self._log(DEBUG, "starting thread (server mode): {}".format(tid))
else:
self._log(DEBUG, "starting thread (client mode): {}".format(tid))
try:
try:
- self.packetizer.write_all(b(self.local_version + "\r\n"))
+ self.packetizer.write_all((self.local_version + "\r\n").encode("utf8"))
self._log(
DEBUG,
"Local version/idstring: {}".format(self.local_version),

View File

@@ -0,0 +1,201 @@
{
stdenv,
lib,
requireFile,
runCommand,
rcu,
testers,
copyDesktopItems,
coreutils,
desktopToDarwinBundle,
gnutar,
libsForQt5,
makeDesktopItem,
net-tools,
protobuf,
python312Packages,
system-config-printer,
wget,
}:
let
python3Packages = python312Packages;
in
python3Packages.buildPythonApplication rec {
pname = "rcu";
version = "4.0.29";
format = "other";
src =
let
src-tarball = requireFile {
name = "rcu-${version}-source.tar.gz";
hash = "sha256-qbHjRKH9GOwBduyod8AOm2SYOjGUH1mYSpCTifOehVM=";
url = "https://www.davisr.me/projects/rcu/";
};
in
runCommand "${src-tarball.name}-unpacked" { } ''
gunzip -ck ${src-tarball} | tar -xvf-
mv rcu $out
ln -s ${src-tarball} $out/src
'';
patches = [
./Port-to-paramiko-4.x.patch
];
postPatch = ''
substituteInPlace src/main.py \
--replace-fail "ui_basepath = '.'" "ui_basepath = '$out/share/rcu'"
substituteInPlace package_support/gnulinux/50-remarkable.rules \
--replace-fail 'GROUP="yourgroup"' 'GROUP="users"'
# This must match the protobuf version imported at runtime, regenerate it
rm src/model/update_metadata_pb2.py
protoc --proto_path src/model src/model/update_metadata.proto --python_out=src/model
# We don't make it available at this location, wrapping adds it to PATH instead
substituteInPlace src/model/document.py \
--replace-fail '/sbin/ifconfig' 'ifconfig'
'';
nativeBuildInputs = [
copyDesktopItems
protobuf
libsForQt5.wrapQtAppsHook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
buildInputs = [
libsForQt5.qtbase
libsForQt5.qtwayland
];
propagatedBuildInputs = with python3Packages; [
certifi
packaging
paramiko
pdfminer-six
pikepdf
pillow
python3Packages.protobuf # otherwise it picks up protobuf from function args
pyside2
];
desktopItems = [
(makeDesktopItem {
name = "rcu";
desktopName = "reMarkable Connection Utility";
comment = "All-in-one offline/local management software for reMarkable e-paper tablets";
icon = "rcu";
exec = "rcu";
})
];
dontConfigure = true;
dontBuild = true;
# No tests
doCheck = false;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share}
cp -r src $out/share/rcu
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
install -Dm644 package_support/gnulinux/50-remarkable.rules $out/etc/udev/rules.d/50-remarkable.rules
''
+ ''
# Keep source from being GC'd by linking into it
for icondir in $(find icons -type d -name '[0-9]*x[0-9]*'); do
iconsize=$(basename $icondir)
mkdir -p $out/share/icons/hicolor/$iconsize/apps
ln -s ${src}/icons/$iconsize/rcu-icon-$iconsize.png $out/share/icons/hicolor/$iconsize/apps/rcu.png
done
mkdir -p $out/share/icons/hicolor/scalable/apps
ln -s ${src}/icons/64x64/rcu-icon-64x64.svg $out/share/icons/hicolor/scalable/apps/rcu.svg
mkdir -p $out/share/doc/rcu
for docfile in {COPYING,manual.pdf}; do
ln -s ${src}/manual/$docfile $out/share/doc/rcu/$docfile
done
mkdir -p $out/share/licenses/rcu
ln -s ${src}/COPYING $out/share/licenses/rcu/COPYING
runHook postInstall
'';
# Manually creating wrapper, hook struggles with lack of shebang & symlink
dontWrapPythonPrograms = true;
preFixup = ''
makeWrapperArgs+=(
"''${qtWrapperArgs[@]}"
--prefix PATH : ${
lib.makeBinPath [
coreutils
gnutar
wget
]
}
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
--prefix PATH : ${
lib.makeBinPath [
net-tools
system-config-printer
]
}
''
+ ''
)
'';
postFixup = ''
makeWrapper ${lib.getExe python3Packages.python} $out/bin/rcu \
''${makeWrapperArgs[@]} \
--prefix PYTHONPATH : ${
python3Packages.makePythonPath (propagatedBuildInputs ++ [ (placeholder "out") ])
} \
--add-flags $out/share/rcu/main.py
'';
passthru = {
tests.version = testers.testVersion {
package = rcu;
version =
let
versionSuffixPos = (lib.strings.stringLength rcu.version) - 1;
in
"d${lib.strings.substring 0 versionSuffixPos rcu.version}(${
lib.strings.substring versionSuffixPos 1 rcu.version
})";
};
# Python stuff automatically adds an updateScript that just fails
updateScript = null;
};
meta = {
mainProgram = "rcu";
description = "All-in-one offline/local management software for reMarkable e-paper tablets";
homepage = "http://www.davisr.me/projects/rcu/";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [
OPNA2608
m0streng0
];
hydraPlatforms = [ ]; # requireFile used as src
};
}