diff options
author | tilpner | 2018-09-25 16:29:49 +0200 |
---|---|---|
committer | tilpner | 2018-09-25 16:30:17 +0200 |
commit | 498d9c36e4d55de478e180cd81845989ddd80eda (patch) | |
tree | 7acc75719223e74e08c23d7071d1376013928859 /default.nix | |
parent | 040ec873821d23e168a59b7ee21697fe0af5bb4c (diff) | |
download | carnix-cross-master.tar.gz carnix-cross-master.tar.xz carnix-cross-master.zip |
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/default.nix b/default.nix index 76c11cf..12a4ba5 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,26 @@ -let +with import ./nixpkgs.nix; +rec { + rust = rustChannelOf { + channel = "stable"; + date = "2018-08-02"; + }; + + target = "x86_64-unknown-linux-musl"; + + buildRustCrateWithFlags = flags: args: (buildRustCrate.override { + rustc = rust.rust.override { + targets = [ "x86_64-unknown-linux-gnu" target ]; + }; + + defaultCrateOverrides = defaultCrateOverrides // { + messages = attrs: { + nativeBuildInputs = [ capnproto ]; + }; + }; + }) (args // { + extraRustcOpts = (args.extraRustcOpts or []) ++ flags; + }); + overlay = self: super: rec { buildRustCrateHelpers = self.callPackage ./buildRustCrateHelpers.nix {}; @@ -12,8 +34,4 @@ let nixpkgs = import (builtins.fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) { overlays = [ overlay ]; }; -in { - inherit (nixpkgs.pkgsCross.aarch64-multiplatform) - hello - rustHello; } |