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:
commit
fc459de60e
@ -71,6 +71,8 @@ in ''
|
|||||||
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0}
|
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0}
|
||||||
export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1}
|
export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1}
|
||||||
export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2}
|
export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2}
|
||||||
|
export NUM_JOBS=1
|
||||||
|
export RUSTC="rustc"
|
||||||
if [[ -n "${versionPre}" ]]; then
|
if [[ -n "${versionPre}" ]]; then
|
||||||
export CARGO_PKG_VERSION_PRE="${versionPre}"
|
export CARGO_PKG_VERSION_PRE="${versionPre}"
|
||||||
fi
|
fi
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
kernel = stdenv.hostPlatform.parsed.kernel.name;
|
kernel = stdenv.hostPlatform.parsed.kernel.name;
|
||||||
abi = stdenv.hostPlatform.parsed.abi.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);
|
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; });
|
mapFeatures = features: map (fun: fun { features = features; });
|
||||||
mkFeatures = feat: lib.lists.foldl (features: featureName:
|
mkFeatures = feat: lib.lists.foldl (features: featureName:
|
||||||
@ -11,10 +12,12 @@
|
|||||||
features
|
features
|
||||||
) [] (builtins.attrNames feat);
|
) [] (builtins.attrNames feat);
|
||||||
include = includedFiles: src: builtins.filterSource (path: type:
|
include = includedFiles: src: builtins.filterSource (path: type:
|
||||||
lib.lists.any (f:
|
lib.lists.any (f:
|
||||||
let p = toString (src + ("/" + f)); in
|
let p = toString (src + ("/" + f));
|
||||||
(path == p) || (type == "directory" && lib.strings.hasPrefix path p)
|
suff = lib.strings.removePrefix p path;
|
||||||
) includedFiles
|
in
|
||||||
|
suff == "" || (lib.strings.hasPrefix "/" suff)
|
||||||
|
) includedFiles
|
||||||
) src;
|
) src;
|
||||||
exclude = excludedFiles: src: builtins.filterSource (path: type:
|
exclude = excludedFiles: src: builtins.filterSource (path: type:
|
||||||
lib.lists.all (f:
|
lib.lists.all (f:
|
||||||
|
@ -20,9 +20,11 @@ crateName: metadata:
|
|||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
cp -r target/build/* $out/lib # */
|
cp -r target/build/* $out/lib # */
|
||||||
fi
|
fi
|
||||||
if [[ "$(ls -A target/bin)" ]]; then
|
if [[ -d target/bin ]]; then
|
||||||
mkdir -p $out/bin
|
if [[ "$(ls -A target/bin)" ]]; then
|
||||||
cp -P target/bin/* $out/bin # */
|
mkdir -p $out/bin
|
||||||
|
cp -P target/bin/* $out/bin # */
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
''
|
''
|
||||||
|
@ -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 }:
|
{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }:
|
||||||
with buildRustCrateHelpers;
|
with buildRustCrateHelpers;
|
||||||
let inherit (lib.lists) fold;
|
let inherit (lib.lists) fold;
|
||||||
@ -6,7 +6,7 @@ let inherit (lib.lists) fold;
|
|||||||
in
|
in
|
||||||
let crates = cratesIO; in
|
let crates = cratesIO; in
|
||||||
rec {
|
rec {
|
||||||
carnix = crates.crates.carnix."0.8.11" deps;
|
carnix = crates.crates.carnix."0.9.2" deps;
|
||||||
__all = [ (carnix {}) ];
|
__all = [ (carnix {}) ];
|
||||||
deps.aho_corasick."0.6.8" = {
|
deps.aho_corasick."0.6.8" = {
|
||||||
memchr = "2.1.0";
|
memchr = "2.1.0";
|
||||||
@ -42,7 +42,7 @@ rec {
|
|||||||
arrayvec = "0.4.7";
|
arrayvec = "0.4.7";
|
||||||
constant_time_eq = "0.1.3";
|
constant_time_eq = "0.1.3";
|
||||||
};
|
};
|
||||||
deps.carnix."0.8.11" = {
|
deps.carnix."0.9.2" = {
|
||||||
clap = "2.32.0";
|
clap = "2.32.0";
|
||||||
dirs = "1.0.4";
|
dirs = "1.0.4";
|
||||||
env_logger = "0.5.13";
|
env_logger = "0.5.13";
|
||||||
@ -51,7 +51,6 @@ rec {
|
|||||||
log = "0.4.5";
|
log = "0.4.5";
|
||||||
nom = "3.2.1";
|
nom = "3.2.1";
|
||||||
regex = "1.0.5";
|
regex = "1.0.5";
|
||||||
rusqlite = "0.14.0";
|
|
||||||
serde = "1.0.80";
|
serde = "1.0.80";
|
||||||
serde_derive = "1.0.80";
|
serde_derive = "1.0.80";
|
||||||
serde_json = "1.0.32";
|
serde_json = "1.0.32";
|
||||||
@ -112,16 +111,9 @@ rec {
|
|||||||
version_check = "0.1.5";
|
version_check = "0.1.5";
|
||||||
};
|
};
|
||||||
deps.libc."0.2.43" = {};
|
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" = {
|
deps.log."0.4.5" = {
|
||||||
cfg_if = "0.1.6";
|
cfg_if = "0.1.6";
|
||||||
};
|
};
|
||||||
deps.lru_cache."0.1.1" = {
|
|
||||||
linked_hash_map = "0.4.2";
|
|
||||||
};
|
|
||||||
deps.memchr."1.0.2" = {
|
deps.memchr."1.0.2" = {
|
||||||
libc = "0.2.43";
|
libc = "0.2.43";
|
||||||
};
|
};
|
||||||
@ -134,7 +126,6 @@ rec {
|
|||||||
deps.nom."3.2.1" = {
|
deps.nom."3.2.1" = {
|
||||||
memchr = "1.0.2";
|
memchr = "1.0.2";
|
||||||
};
|
};
|
||||||
deps.pkg_config."0.3.14" = {};
|
|
||||||
deps.proc_macro2."0.4.20" = {
|
deps.proc_macro2."0.4.20" = {
|
||||||
unicode_xid = "0.1.0";
|
unicode_xid = "0.1.0";
|
||||||
};
|
};
|
||||||
@ -170,12 +161,6 @@ rec {
|
|||||||
deps.remove_dir_all."0.5.1" = {
|
deps.remove_dir_all."0.5.1" = {
|
||||||
winapi = "0.3.6";
|
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.rustc_demangle."0.1.9" = {};
|
||||||
deps.ryu."0.2.6" = {};
|
deps.ryu."0.2.6" = {};
|
||||||
deps.scoped_threadpool."0.1.9" = {};
|
deps.scoped_threadpool."0.1.9" = {};
|
||||||
@ -220,11 +205,6 @@ rec {
|
|||||||
deps.thread_local."0.3.6" = {
|
deps.thread_local."0.3.6" = {
|
||||||
lazy_static = "1.1.0";
|
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" = {
|
deps.toml."0.4.8" = {
|
||||||
serde = "1.0.80";
|
serde = "1.0.80";
|
||||||
};
|
};
|
||||||
@ -232,7 +212,6 @@ rec {
|
|||||||
deps.unicode_width."0.1.5" = {};
|
deps.unicode_width."0.1.5" = {};
|
||||||
deps.unicode_xid."0.1.0" = {};
|
deps.unicode_xid."0.1.0" = {};
|
||||||
deps.utf8_ranges."1.0.1" = {};
|
deps.utf8_ranges."1.0.1" = {};
|
||||||
deps.vcpkg."0.2.6" = {};
|
|
||||||
deps.vec_map."0.8.1" = {};
|
deps.vec_map."0.8.1" = {};
|
||||||
deps.version_check."0.1.5" = {};
|
deps.version_check."0.1.5" = {};
|
||||||
deps.winapi."0.3.6" = {
|
deps.winapi."0.3.6" = {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user