From e1f104cb19968cc1ed3400a075bb7b18642e4e78 Mon Sep 17 00:00:00 2001 From: meh Date: Sun, 4 Oct 2020 18:28:14 +0200 Subject: [PATCH] chore: add nix-shell stuff --- sys/Cargo.toml | 2 +- sys/shell.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 sys/shell.nix diff --git a/sys/Cargo.toml b/sys/Cargo.toml index 645bf17..45667f2 100644 --- a/sys/Cargo.toml +++ b/sys/Cargo.toml @@ -22,7 +22,7 @@ libc = "0.2" num_cpus = "1.11" cc = "1.0" pkg-config = "0.3" -bindgen = "0.54" +bindgen = "0.55" [target.'cfg(target_env = "msvc")'.build-dependencies] vcpkg = "0.2" diff --git a/sys/shell.nix b/sys/shell.nix new file mode 100644 index 0000000..024bb7b --- /dev/null +++ b/sys/shell.nix @@ -0,0 +1,21 @@ +let + mozilla = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); +in + +with (import { + overlays = [mozilla]; +}); + +mkShell { + name = "ffmpeg-sys"; + + buildInputs = [ + # For building. + clang rustChannels.stable.rust pkg-config ffmpeg + ]; + + RUST_BACKTRACE = 1; + RUSTFLAGS = "-C target-cpu=native"; + + LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; +}