From 3bc498fc4135bf62af97b77dfc14468aa6e89445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Tue, 12 Nov 2024 17:40:44 +0100 Subject: [PATCH 1/7] termscp: enable tests --- pkgs/tools/networking/termscp/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index 02dcb1e9ee184..d48c284109de4 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -54,8 +54,13 @@ rustPlatform.buildRustPackage rec { ] ); - # 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" + ]; passthru = { updateScript = nix-update-script { }; From 3c3138d2f203cd79fc8cd60248aa02fa8b6601cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Wed, 13 Nov 2024 10:41:42 +0100 Subject: [PATCH 2/7] termscp: add version check --- pkgs/tools/networking/termscp/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index d48c284109de4..f06b89a973dec 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -11,6 +11,7 @@ Foundation, Security, samba, + versionCheckHook, nix-update-script, }: @@ -54,6 +55,11 @@ rustPlatform.buildRustPackage rec { ] ); + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + checkFeatures = [ "isolated-tests" ]; checkFlags = [ # requires networking From 1b4a53797f0108e522e9c15cece126e552e9a1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Tue, 12 Nov 2024 20:41:55 +0100 Subject: [PATCH 3/7] termscp: add meta.platforms --- pkgs/tools/networking/termscp/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index f06b89a973dec..549571f720b62 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -81,5 +81,6 @@ rustPlatform.buildRustPackage rec { maintainers = with lib.maintainers; [ fab ]; + platforms = with lib.platforms; linux ++ darwin; }; } From 7feb128ce9377a81666245fa54ac682daa3e050c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Tue, 12 Nov 2024 20:38:14 +0100 Subject: [PATCH 4/7] termscp: migrate to new apple sdk structure --- pkgs/tools/networking/termscp/default.nix | 29 ++++------------------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/tools/networking/termscp/default.nix index 549571f720b62..28c64ca348d00 100644 --- a/pkgs/tools/networking/termscp/default.nix +++ b/pkgs/tools/networking/termscp/default.nix @@ -1,15 +1,10 @@ { lib, - stdenv, dbus, fetchFromGitHub, openssl, pkg-config, rustPlatform, - AppKit, - Cocoa, - Foundation, - Security, samba, versionCheckHook, nix-update-script, @@ -32,29 +27,15 @@ 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 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f45b720e1db1..57c48e063bb1f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5469,9 +5469,7 @@ with pkgs; pythonPackages = python3Packages; }; - termscp = callPackage ../tools/networking/termscp { - inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation Security; - }; + termscp = callPackage ../tools/networking/termscp { }; texmacs = libsForQt5.callPackage ../applications/editors/texmacs { stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; From 074882f46a3a479d3fc9b324e83eda3757d87635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Tue, 12 Nov 2024 20:44:39 +0100 Subject: [PATCH 5/7] termscp: migrate to by-name --- .../termscp/default.nix => by-name/te/termscp/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{tools/networking/termscp/default.nix => by-name/te/termscp/package.nix} (100%) diff --git a/pkgs/tools/networking/termscp/default.nix b/pkgs/by-name/te/termscp/package.nix similarity index 100% rename from pkgs/tools/networking/termscp/default.nix rename to pkgs/by-name/te/termscp/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 57c48e063bb1f..b814d2bd8f1dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5469,8 +5469,6 @@ with pkgs; pythonPackages = python3Packages; }; - termscp = callPackage ../tools/networking/termscp { }; - texmacs = libsForQt5.callPackage ../applications/editors/texmacs { stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; extraFonts = true; From c6452a46659d242f836a76e2e00ee567b1b9807e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Tue, 12 Nov 2024 20:59:14 +0100 Subject: [PATCH 6/7] termscp: add maintainer gepbird --- pkgs/by-name/te/termscp/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/te/termscp/package.nix b/pkgs/by-name/te/termscp/package.nix index 28c64ca348d00..7c0435b96886f 100644 --- a/pkgs/by-name/te/termscp/package.nix +++ b/pkgs/by-name/te/termscp/package.nix @@ -61,6 +61,7 @@ rustPlatform.buildRustPackage rec { mainProgram = "termscp"; maintainers = with lib.maintainers; [ fab + gepbird ]; platforms = with lib.platforms; linux ++ darwin; }; From dd0d6b35fe27b0ccc5c41654564cfbd910c54e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Fri, 15 Nov 2024 06:58:48 +0100 Subject: [PATCH 7/7] termscp: disable failing darwin tests --- pkgs/by-name/te/termscp/package.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/te/termscp/package.nix b/pkgs/by-name/te/termscp/package.nix index 7c0435b96886f..076d11b29722f 100644 --- a/pkgs/by-name/te/termscp/package.nix +++ b/pkgs/by-name/te/termscp/package.nix @@ -1,5 +1,6 @@ { lib, + stdenvNoCC, dbus, fetchFromGitHub, openssl, @@ -42,12 +43,17 @@ rustPlatform.buildRustPackage rec { doInstallCheck = true; 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" - ]; + 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 { };