-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshell.nix
More file actions
31 lines (31 loc) · 782 Bytes
/
shell.nix
File metadata and controls
31 lines (31 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
let
# TODO: pin nixpkgs to a specific version?
# nixpkgs = import (fetchTarball("https://github.com/NixOS/nixpkgs/archive/52f9de5b39a22c86899d6e35c68ac7fab42dbb98.tar.gz")) {};
nixpkgs = import <nixpkgs> { };
inherit (nixpkgs) pkgs llvmPackages;
stdenv = pkgs.clangStdenv;
in
stdenv.mkDerivation {
name = "c2rust";
buildInputs = [
# Rust stuff
pkgs.rustc
pkgs.cargo
# for c2rust
pkgs.libclang
pkgs.clang
pkgs.llvmPackages.libclang
pkgs.cmake
pkgs.llvm
pkgs.openssl
pkgs.pkgconfig
pkgs.python3
pkgs.zlib
# for getting compile_commands.json from Makefile in transpile.sh
pkgs.bear
# for refactoring in transpile.sh
pkgs.gnused
pkgs.perl
];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
}