nixpkgs/pkgs/tools/networking/termscp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.2 KiB
Nix
Raw Normal View History

2021-10-17 17:56:47 +00:00
{ lib
2023-02-21 22:42:42 +00:00
, stdenv
2021-10-17 17:56:47 +00:00
, dbus
, fetchFromGitHub
, openssl
, pkg-config
, rustPlatform
, AppKit
, Cocoa
termscp: fix darwin build I was running into Foundation.h errors during compilation on mac/darwin, adding Foundation fixes that for me. Error: ``` The following warnings were emitted during compilation: warning: In file included from objc/notify.m:1: warning: objc/notify.h:1:9: fatal error: 'Foundation/Foundation.h' file not found warning: #import <Foundation/Foundation.h> warning: ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: 1 error generated. error: failed to run custom build command for `mac-notification-sys v0.3.0` Caused by: process didn't exit successfully: `/tmp/cargo-installEt3UWW/release/build/mac-notification-sys-f414f8995c05e541/build-script-build` (exit status: 1) --- stdout TARGET = Some("x86_64-apple-darwin") OPT_LEVEL = Some("3") HOST = Some("x86_64-apple-darwin") CC_x86_64-apple-darwin = None CC_x86_64_apple_darwin = None HOST_CC = None CC = Some("clang") CFLAGS_x86_64-apple-darwin = None CFLAGS_x86_64_apple_darwin = None HOST_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-apple-darwin" "-fmodules" "-o" "/tmp/cargo-installEt3UWW/release/build/mac-notification-sys-ce5dd87fdfef4721/out/objc/notify.o" "-c" "objc/notify.m" cargo:warning=In file included from objc/notify.m:1: cargo:warning=objc/notify.h:1:9: fatal error: 'Foundation/Foundation.h' file not found cargo:warning=#import <Foundation/Foundation.h> cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=1 error generated. exit status: 1 --- stderr error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-apple-darwin" "-fmodules" "-o" "/tmp/cargo-installEt3UWW/release/build/mac-notification-sys-ce5dd87fdfef4721/out/objc/notify.o" "-c" "objc/notify.m" with args "clang" did not execute successfully (status code exit status: 1). warning: build failed, waiting for other jobs to finish... error: failed to compile `termscp v0.7.0`, intermediate artifacts can be found at `/tmp/cargo-installEt3UWW` Caused by: build failed ```
2021-11-08 16:20:33 +00:00
, Foundation
2021-10-17 17:56:47 +00:00
, Security
2023-10-03 19:15:40 +00:00
, samba
2021-10-17 17:56:47 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "termscp";
version = "0.13.0";
2021-10-17 17:56:47 +00:00
src = fetchFromGitHub {
owner = "veeso";
repo = "termscp";
2023-02-21 22:42:42 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-/Mnoljgp87ML6+3vV1vZTFO0TSY5hr8E8U1fXJq31pE=";
2021-10-17 17:56:47 +00:00
};
cargoHash = "sha256-xq21cncEYNSwDiKvVSM1J2Jz3TqOkYMK3gckKpM5+6E=";
2021-10-17 17:56:47 +00:00
nativeBuildInputs = [
pkg-config
];
buildInputs = [
dbus
openssl
2023-10-03 19:15:40 +00:00
samba
] ++ lib.optionals stdenv.isDarwin [
AppKit
Cocoa
termscp: fix darwin build I was running into Foundation.h errors during compilation on mac/darwin, adding Foundation fixes that for me. Error: ``` The following warnings were emitted during compilation: warning: In file included from objc/notify.m:1: warning: objc/notify.h:1:9: fatal error: 'Foundation/Foundation.h' file not found warning: #import <Foundation/Foundation.h> warning: ^~~~~~~~~~~~~~~~~~~~~~~~~ warning: 1 error generated. error: failed to run custom build command for `mac-notification-sys v0.3.0` Caused by: process didn't exit successfully: `/tmp/cargo-installEt3UWW/release/build/mac-notification-sys-f414f8995c05e541/build-script-build` (exit status: 1) --- stdout TARGET = Some("x86_64-apple-darwin") OPT_LEVEL = Some("3") HOST = Some("x86_64-apple-darwin") CC_x86_64-apple-darwin = None CC_x86_64_apple_darwin = None HOST_CC = None CC = Some("clang") CFLAGS_x86_64-apple-darwin = None CFLAGS_x86_64_apple_darwin = None HOST_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-apple-darwin" "-fmodules" "-o" "/tmp/cargo-installEt3UWW/release/build/mac-notification-sys-ce5dd87fdfef4721/out/objc/notify.o" "-c" "objc/notify.m" cargo:warning=In file included from objc/notify.m:1: cargo:warning=objc/notify.h:1:9: fatal error: 'Foundation/Foundation.h' file not found cargo:warning=#import <Foundation/Foundation.h> cargo:warning= ^~~~~~~~~~~~~~~~~~~~~~~~~ cargo:warning=1 error generated. exit status: 1 --- stderr error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=x86_64-apple-darwin" "-fmodules" "-o" "/tmp/cargo-installEt3UWW/release/build/mac-notification-sys-ce5dd87fdfef4721/out/objc/notify.o" "-c" "objc/notify.m" with args "clang" did not execute successfully (status code exit status: 1). warning: build failed, waiting for other jobs to finish... error: failed to compile `termscp v0.7.0`, intermediate artifacts can be found at `/tmp/cargo-installEt3UWW` Caused by: build failed ```
2021-11-08 16:20:33 +00:00
Foundation
2021-10-17 17:56:47 +00:00
Security
];
2022-10-27 01:40:09 +00:00
# Needed to get openssl-sys to use pkg-config.
OPENSSL_NO_VENDOR = 1;
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
"-framework" "AppKit"
]);
2021-10-17 17:56:47 +00:00
# Requires network access
doCheck = false;
meta = with lib; {
2023-10-03 19:15:40 +00:00
description = "A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB";
2021-10-17 17:56:47 +00:00
homepage = "https://github.com/veeso/termscp";
2023-02-21 22:42:42 +00:00
changelog = "https://github.com/veeso/termscp/blob/v${version}/CHANGELOG.md";
2021-10-17 17:56:47 +00:00
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
2024-02-11 02:19:15 +00:00
mainProgram = "termscp";
2021-10-17 17:56:47 +00:00
};
}