Merge pull request #82852 from Mic92/cross-build-rust-package

[WIP] buildRustPackage: enable strictDeps
This commit is contained in:
Jörg Thalheim
2020-03-29 14:07:07 +01:00
committed by GitHub
20 changed files with 31 additions and 69 deletions

View File

@@ -1,25 +0,0 @@
{ stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "parallel-rust";
version = "0.11.3";
src = fetchFromGitHub {
owner = "mmstick";
repo = "parallel";
rev = version;
sha256 = "1bb1m3ckkrxlnw9w24ig70bd1zwyrbaw914q3xz5yv43c0l6pn9c";
};
cargoSha256 = "1r5chjhmy6ivhsvgqf75ph1qxa4x7n20f7rb3b6maqpbsc64km9n";
patches = [ ./fix_cargo_lock_version.patch ];
meta = with stdenv.lib; {
description = "A command-line CPU load balancer written in Rust";
homepage = https://github.com/mmstick/parallel;
license = licenses.mit;
maintainers = [];
platforms = platforms.all;
};
}

View File

@@ -1,12 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index c01308d..dba3927 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
[root]
name = "parallel"
-version = "0.11.2"
+version = "0.11.3"
dependencies = [
"arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@@ -11,7 +11,8 @@ rustPlatform.buildRustPackage rec {
sha256 = "0ywb53snvymmwh10hm6whckz7dwmpqa4rxiggd24y178jdfrm2ns";
};
buildInputs = [ pkgconfig openssl ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl ];
cargoSha256 = "0vckay4jhg02xg68mvh7ys0yjj0p30m6wsjriqc8k24wjsrhiw9k";
meta = with stdenv.lib; {

View File

@@ -20,8 +20,8 @@ rustPlatform.buildRustPackage {
[ "CARGO=${cargo}/bin/cargo" "PREFIX=$(out)" "PROFILE=release" "INSTALLDIR_MAN=$(out)/share/man/man1" ]
++ lib.optional (prefix != null) [ "PROG_PREFIX=${prefix}" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ cargo sphinx ] ++ lib.optional stdenv.isDarwin Security;
nativeBuildInputs = [ cmake cargo sphinx ];
buildInputs = lib.optional stdenv.isDarwin Security;
# empty {build,install}Phase to use defaults of `stdenv.mkDerivation` rather than rust defaults
buildPhase = "";

View File

@@ -20,7 +20,8 @@ python3Packages.buildPythonApplication rec {
inherit src;
sourceRoot = "source/rust";
cargoSha256 = "0cqy0s55pkg6hww86h7qip4xaidh6g8lcypdj84n2x374jq38c5d";
buildInputs = [ pkgconfig openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ];
};
propagatedBuildInputs = with python3Packages; [

View File

@@ -21,7 +21,8 @@ rustPlatform.buildRustPackage rec {
};
cargoSha256 = "1al8jzjxjhxwb5n1d52pvl59d11g0bdg2dcw8ir2nclya1w68f2w";
buildInputs = [ openssl pkg-config protobuf rdkafka ]
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl protobuf rdkafka ]
++ stdenv.lib.optional stdenv.isDarwin [ Security libiconv ];
# needed for internal protobuf c wrapper library

View File

@@ -12,10 +12,8 @@ rustPlatform.buildRustPackage rec {
sha256 = "0i41hqig8v6w1qb6498239iix1rss0lznm5lcl9m3i439c2zv7pw";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
openssl pkgconfig
] ++ lib.optionals stdenv.isDarwin [
nativeBuildInputs = [ makeWrapper pkgconfig ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
libiconv darwin.apple_sdk.frameworks.Security
];

View File

@@ -23,8 +23,8 @@ rustPlatform.buildRustPackage rec {
cargoPatches = [ ./0001-Generate-lockfile-for-cargo-update-v3.0.0.patch ];
cargoSha256 = "034v1ql5k3n3rgi3aqszkybvv3vc80v263c9nlwxcwbswsh9jpp1";
nativeBuildInputs = [ cmake ];
buildInputs = [ libgit2 libssh2 openssl pkg-config zlib ]
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libgit2 libssh2 openssl zlib ]
++ stdenv.lib.optional stdenv.isDarwin curl;
meta = with stdenv.lib; {

View File

@@ -16,9 +16,9 @@ buildRustPackage rec {
cargoBuildFlags = [ "-p ripasso-cursive -p ripasso-man" ];
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig gpgme python3 ];
buildInputs = [
ncurses python3 openssl libgpgerror gpgme xorg.libxcb
ncurses openssl libgpgerror gpgme xorg.libxcb
] ++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Security ];
preFixup = ''

View File

@@ -28,6 +28,7 @@ rustPlatform.buildRustPackage rec {
llvmPackages.libclang
llvmPackages.clang
ensureNewerSourcesForZipFilesHook
capnproto
] ++
lib.optionals pythonSupport [ pythonPackages.setuptools ]
;
@@ -41,9 +42,7 @@ rustPlatform.buildRustPackage rec {
openssl
sqlite
nettle
capnproto
]
++ lib.optionals pythonSupport [ pythonPackages.python pythonPackages.cffi ]
] ++ lib.optionals pythonSupport [ pythonPackages.python pythonPackages.cffi ]
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]
;