Merge pull request #50452 from P-E-Meunier/carnix-fix

Rust build-support: fixing a compilation error in some crates
This commit is contained in:
Graham Christensen 2018-12-03 10:53:25 -05:00 committed by GitHub
commit fc459de60e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 297 additions and 383 deletions

View file

@ -71,6 +71,8 @@ in ''
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0}
export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1}
export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2}
export NUM_JOBS=1
export RUSTC="rustc"
if [[ -n "${versionPre}" ]]; then
export CARGO_PKG_VERSION_PRE="${versionPre}"
fi

View file

@ -2,6 +2,7 @@
{
kernel = stdenv.hostPlatform.parsed.kernel.name;
abi = stdenv.hostPlatform.parsed.abi.name;
cpu = stdenv.hostPlatform.parsed.cpu.name;
updateFeatures = f: up: functions: builtins.deepSeq f (lib.lists.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
mapFeatures = features: map (fun: fun { features = features; });
mkFeatures = feat: lib.lists.foldl (features: featureName:
@ -11,10 +12,12 @@
features
) [] (builtins.attrNames feat);
include = includedFiles: src: builtins.filterSource (path: type:
lib.lists.any (f:
let p = toString (src + ("/" + f)); in
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
) includedFiles
lib.lists.any (f:
let p = toString (src + ("/" + f));
suff = lib.strings.removePrefix p path;
in
suff == "" || (lib.strings.hasPrefix "/" suff)
) includedFiles
) src;
exclude = excludedFiles: src: builtins.filterSource (path: type:
lib.lists.all (f:

View file

@ -20,9 +20,11 @@ crateName: metadata:
mkdir -p $out/lib
cp -r target/build/* $out/lib # */
fi
if [[ "$(ls -A target/bin)" ]]; then
mkdir -p $out/bin
cp -P target/bin/* $out/bin # */
if [[ -d target/bin ]]; then
if [[ "$(ls -A target/bin)" ]]; then
mkdir -p $out/bin
cp -P target/bin/* $out/bin # */
fi
fi
runHook postInstall
''

View file

@ -1,4 +1,4 @@
# Generated by carnix 0.8.11: carnix generate-nix
# Generated by carnix 0.9.1: carnix generate-nix
{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }:
with buildRustCrateHelpers;
let inherit (lib.lists) fold;
@ -6,7 +6,7 @@ let inherit (lib.lists) fold;
in
let crates = cratesIO; in
rec {
carnix = crates.crates.carnix."0.8.11" deps;
carnix = crates.crates.carnix."0.9.2" deps;
__all = [ (carnix {}) ];
deps.aho_corasick."0.6.8" = {
memchr = "2.1.0";
@ -42,7 +42,7 @@ rec {
arrayvec = "0.4.7";
constant_time_eq = "0.1.3";
};
deps.carnix."0.8.11" = {
deps.carnix."0.9.2" = {
clap = "2.32.0";
dirs = "1.0.4";
env_logger = "0.5.13";
@ -51,7 +51,6 @@ rec {
log = "0.4.5";
nom = "3.2.1";
regex = "1.0.5";
rusqlite = "0.14.0";
serde = "1.0.80";
serde_derive = "1.0.80";
serde_json = "1.0.32";
@ -112,16 +111,9 @@ rec {
version_check = "0.1.5";
};
deps.libc."0.2.43" = {};
deps.libsqlite3_sys."0.9.3" = {
pkg_config = "0.3.14";
};
deps.linked_hash_map."0.4.2" = {};
deps.log."0.4.5" = {
cfg_if = "0.1.6";
};
deps.lru_cache."0.1.1" = {
linked_hash_map = "0.4.2";
};
deps.memchr."1.0.2" = {
libc = "0.2.43";
};
@ -134,7 +126,6 @@ rec {
deps.nom."3.2.1" = {
memchr = "1.0.2";
};
deps.pkg_config."0.3.14" = {};
deps.proc_macro2."0.4.20" = {
unicode_xid = "0.1.0";
};
@ -170,12 +161,6 @@ rec {
deps.remove_dir_all."0.5.1" = {
winapi = "0.3.6";
};
deps.rusqlite."0.14.0" = {
bitflags = "1.0.4";
libsqlite3_sys = "0.9.3";
lru_cache = "0.1.1";
time = "0.1.40";
};
deps.rustc_demangle."0.1.9" = {};
deps.ryu."0.2.6" = {};
deps.scoped_threadpool."0.1.9" = {};
@ -220,11 +205,6 @@ rec {
deps.thread_local."0.3.6" = {
lazy_static = "1.1.0";
};
deps.time."0.1.40" = {
libc = "0.2.43";
redox_syscall = "0.1.40";
winapi = "0.3.6";
};
deps.toml."0.4.8" = {
serde = "1.0.80";
};
@ -232,7 +212,6 @@ rec {
deps.unicode_width."0.1.5" = {};
deps.unicode_xid."0.1.0" = {};
deps.utf8_ranges."1.0.1" = {};
deps.vcpkg."0.2.6" = {};
deps.vec_map."0.8.1" = {};
deps.version_check."0.1.5" = {};
deps.winapi."0.3.6" = {

File diff suppressed because it is too large Load diff