diff options
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; } |