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
commit d04396da8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 31 additions and 69 deletions

View File

@ -43,6 +43,7 @@ rustPlatform.buildRustPackage rec {
rustc
python3
wrapGAppsHook
glib
];
buildInputs = [

View File

@ -14,8 +14,8 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "09v991rl2w4c4jh7ga7q1lk6wyl2vr71j5cpniij8mcvszrz78qf";
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ openssl python3 xorg.libxcb libgit2 ] ++ stdenv.lib.optionals stdenv.isDarwin
nativeBuildInputs = [ cmake pkgconfig python3 ];
buildInputs = [ openssl xorg.libxcb libgit2 ] ++ stdenv.lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
# Tests need to write to the theme directory in HOME.

View File

@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
owner = "nebogeo";
repo = "fluxus";
rev = "ba9aee218dd4a9cfab914ad78bdb6d59e9a37400";
hash = "sha256:0mwghpgq4n1khwlmgscirhmcdhi6x00c08q4idi2zcqz961bbs28";
sha256 = "0mwghpgq4n1khwlmgscirhmcdhi6x00c08q4idi2zcqz961bbs28";
};
buildInputs = [

View File

@ -24,10 +24,10 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [
pkgconfig
asciidoctor
]
++ stdenv.lib.optionals stdenv.isDarwin [ makeWrapper libiconv ];
gettext
] ++ stdenv.lib.optionals stdenv.isDarwin [ makeWrapper libiconv ];
buildInputs = [ stfl sqlite curl gettext libxml2 json_c ncurses ]
buildInputs = [ stfl sqlite curl libxml2 json_c ncurses ]
++ stdenv.lib.optional stdenv.isDarwin Security;
postBuild = ''

View File

@ -46,6 +46,7 @@ rustPlatform.buildRustPackage rec {
python3
rustc
wrapGAppsHook
glib
];
buildInputs = [
@ -84,4 +85,3 @@ rustPlatform.buildRustPackage rec {
maintainers = with maintainers; [ dtzWill worldofpeace ];
};
}

View File

@ -16,8 +16,8 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "0shlh0m9k0iqxpv9zmiw7a6v197swrvpz9x6qzhximzkdwni9gz9";
buildInputs = [ pkgconfig ];
propagatedBuildInputs = [ openssl gmp ncurses ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl gmp ncurses ];
# Some tests fail and/or attempt to use internet servers.
doCheck = false;

View File

@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
sha256 = "1zv87nqhrzsxx0m891df4vagzssj3kblfv9yp7j96dw0vn9950qa";
};
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ makeWrapper ];
propagatedBuildInputs = with qt5; [
qt5.qtbase
@ -20,7 +20,6 @@ rustPlatform.buildRustPackage rec {
qtsvg
qtquickcontrols2
qtgraphicaleffects
pkgconfig
git
];

View File

@ -13,11 +13,11 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1sj80a99iakxxa698gggiszsrxwlwhr2sx4wmsni0cshx6z2x6za";
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
buildInputs = [ openssl ]
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
nativeBuildInputs = [
pkgconfig
openssl
];
meta = with stdenv.lib; {

View File

@ -13,7 +13,8 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "16ylk125p368mcz8nandmfqlygrqjlf8mqaxlbpixqga378saidl";
buildInputs = [ llvmPackages.libclang llvmPackages.clang ];
nativeBuildInputs = [ llvmPackages.clang ];
buildInputs = [ llvmPackages.libclang ];
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
postInstall = ''

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 ]
;

View File

@ -2093,8 +2093,6 @@ in
precice = callPackage ../development/libraries/precice { };
parallel-rust = callPackage ../tools/misc/parallel-rust { };
pueue = callPackage ../applications/misc/pueue { };
pixiecore = callPackage ../tools/networking/pixiecore {};