shell.nix 467 Bytes
Newer Older
Astro's avatar
Astro committed
1
2
{ pkgs ? import <nixpkgs> {} }:

Astro's avatar
Astro committed
3
with pkgs;
Astro's avatar
Astro committed
4
5
with import ./default.nix;

6
stdenv.mkDerivation {
Astro's avatar
Astro committed
7
  name = "env";
Astro's avatar
Astro committed
8
  buildInputs = [
Astro's avatar
Astro committed
9
    gdb
10
    glibc_multi
Astro's avatar
Astro committed
11
    rust
Astro's avatar
Astro committed
12
    pkgsCross.arm-embedded.stdenv.cc
Astro's avatar
Astro committed
13
14
  ];

Kloenk's avatar
Kloenk committed
15
  LIBCLANG_PATH="${llvmPackages.libclang}/lib";
Astro's avatar
Astro committed
16
  shellHook = ''
Kloenk's avatar
Kloenk committed
17
    export CPATH="${glibc_multi.dev}/include:${stdenv.cc.cc}/lib/gcc/$(cc -dumpmachine)/${lib.getVersion pkgsCross.arm-embedded.stdenv.cc.cc}/include"
Astro's avatar
Astro committed
18
    echo "Run 'cargo build --release'"
Astro's avatar
Astro committed
19
20
  '';
}