mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 02:33:25 +00:00
78f07d0f89
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 ```
49 lines
875 B
Nix
49 lines
875 B
Nix
{ lib
|
|
, dbus
|
|
, fetchFromGitHub
|
|
, libssh
|
|
, openssl
|
|
, pkg-config
|
|
, rustPlatform
|
|
, Foundation
|
|
, Security
|
|
, stdenv
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "termscp";
|
|
version = "0.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "veeso";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "131kij6pnw9r0p2a28g00z85dh758h4rm9ic09qmp61cq7dphkc1";
|
|
};
|
|
|
|
cargoSha256 = "1k2vwmfy6dczgs3bz8k4j24cc8l7l9fdh3ymp79ril4rp1v6kfp2";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
dbus
|
|
libssh
|
|
openssl
|
|
] ++ lib.optional stdenv.isDarwin [
|
|
Foundation
|
|
Security
|
|
];
|
|
|
|
# Requires network access
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "Terminal tool for file transfer and explorer";
|
|
homepage = "https://github.com/veeso/termscp";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|