Skip to content

Commit

Permalink
termscp: enable tests, new apple sdk, refactor (#355503)
Browse files Browse the repository at this point in the history
  • Loading branch information
happysalada authored Nov 15, 2024
2 parents 25eb70c + dd0d6b3 commit 874e2cb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
lib,
stdenv,
stdenvNoCC,
dbus,
fetchFromGitHub,
openssl,
pkg-config,
rustPlatform,
AppKit,
Cocoa,
Foundation,
Security,
samba,
versionCheckHook,
nix-update-script,
}:

Expand All @@ -31,31 +28,32 @@ rustPlatform.buildRustPackage rec {
pkg-config
];

buildInputs =
[
dbus
openssl
samba
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
AppKit
Cocoa
Foundation
Security
];
buildInputs = [
dbus
openssl
samba
];

# Needed to get openssl-sys to use pkg-config.
OPENSSL_NO_VENDOR = 1;

env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.hostPlatform.isDarwin [
"-framework"
"AppKit"
]
);
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;

# Requires network access
doCheck = false;
checkFeatures = [ "isolated-tests" ];
checkFlags =
[
# requires networking
"--skip=cli::remote::test::test_should_make_remote_args_from_one_bookmark_and_one_remote_with_local_dir"
"--skip=cli::remote::test::test_should_make_remote_args_from_two_bookmarks_and_local_dir"
"--skip=cli::remote::test::test_should_make_remote_args_from_two_remotes_and_local_dir"
]
++ lib.optionals stdenvNoCC.isDarwin [
"--skip=system::watcher::test::should_poll_file_removed"
"--skip=system::watcher::test::should_poll_file_update"
];

passthru = {
updateScript = nix-update-script { };
Expand All @@ -69,6 +67,8 @@ rustPlatform.buildRustPackage rec {
mainProgram = "termscp";
maintainers = with lib.maintainers; [
fab
gepbird
];
platforms = with lib.platforms; linux ++ darwin;
};
}
4 changes: 0 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5467,10 +5467,6 @@ with pkgs;
pythonPackages = python3Packages;
};

termscp = callPackage ../tools/networking/termscp {
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation Security;
};

texmacs = libsForQt5.callPackage ../applications/editors/texmacs {
stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
extraFonts = true;
Expand Down

0 comments on commit 874e2cb

Please sign in to comment.