mirror of
https://github.com/pimalaya/himalaya.git
synced 2024-12-09 21:18:39 +03:00
fix shell
This commit is contained in:
4712
Cargo.lock
generated
4712
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
4
build.rs
4
build.rs
@@ -6,11 +6,11 @@
|
||||
// use git2::{DescribeOptions, Repository};
|
||||
// use serde::Deserialize;
|
||||
|
||||
// fn main() {
|
||||
fn main() {
|
||||
// features_env();
|
||||
// target_envs();
|
||||
// git_envs();
|
||||
// }
|
||||
}
|
||||
|
||||
// /// Builds the `CARGO_FEATURES` environment variable.
|
||||
// ///
|
||||
|
||||
25
default.nix
25
default.nix
@@ -1,21 +1,24 @@
|
||||
{ target
|
||||
{ target ? null
|
||||
, isStatic ? true
|
||||
, defaultFeatures ? true
|
||||
, features ? ""
|
||||
}:
|
||||
|
||||
let
|
||||
systems = import ./systems.nix;
|
||||
system = systems.${target};
|
||||
|
||||
buildPackages = import (fetchTarball "https://github.com/soywod/nixpkgs/archive/master.tar.gz") { };
|
||||
inherit (buildPackages) stdenv binutils mktemp gnutar zip;
|
||||
|
||||
pkgs = import (fetchTarball "https://github.com/soywod/nixpkgs/archive/master.tar.gz") {
|
||||
crossSystem = {
|
||||
isStatic = true;
|
||||
config = target;
|
||||
};
|
||||
};
|
||||
pkgs = import (fetchTarball "https://github.com/soywod/nixpkgs/archive/master.tar.gz") (
|
||||
if isNull target then { } else {
|
||||
crossSystem = {
|
||||
inherit isStatic;
|
||||
config = target;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
systems = import ./systems.nix;
|
||||
system = if isNull target then null else systems.${target};
|
||||
|
||||
inherit (pkgs) lib hostPlatform;
|
||||
|
||||
@@ -25,7 +28,7 @@ let
|
||||
|
||||
rustToolchain = mkToolchain.fromTarget {
|
||||
inherit lib;
|
||||
targetSystem = system.rustTarget;
|
||||
targetSystem = if isNull system then null else system.rustTarget;
|
||||
};
|
||||
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
|
||||
@@ -39,6 +39,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
# unit tests only
|
||||
doCheck = false;
|
||||
auditable = false;
|
||||
cargoTestFlags = [ "--lib" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
|
||||
@@ -17,16 +17,14 @@ rec {
|
||||
armv7l-unknown-linux-musleabihf = "armv7-unknown-linux-musleabihf";
|
||||
}.${target} or target;
|
||||
|
||||
fromTarget = { lib, targetSystem }:
|
||||
fromTarget = { lib, targetSystem ? null }:
|
||||
let
|
||||
target = toRustTarget targetSystem;
|
||||
name = (lib.importTOML file).toolchain.channel;
|
||||
toolchain = fenix.fromToolchainName { inherit name sha256; };
|
||||
targetToolchain = fenix.targets.${target}.fromToolchainName { inherit name sha256; };
|
||||
target = if isNull targetSystem then null else toRustTarget targetSystem;
|
||||
components = [ toolchain.rustc toolchain.cargo ]
|
||||
++ lib.optional (!isNull target) (fenix.targets.${target}.fromToolchainName { inherit name sha256; }.rust-std);
|
||||
in
|
||||
fenix.combine [
|
||||
toolchain.rustc
|
||||
toolchain.cargo
|
||||
targetToolchain.rust-std
|
||||
];
|
||||
|
||||
fenix.combine components;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user