Skip to content

Commit

Permalink
Fixes #33, #53.
Browse files Browse the repository at this point in the history
Added tests for real crates depending on workspace_member = null.
  • Loading branch information
kolloch committed Mar 11, 2020
1 parent 075fe14 commit 2a440a1
Show file tree
Hide file tree
Showing 12 changed files with 3,203 additions and 798 deletions.
File renamed without changes.
996 changes: 996 additions & 0 deletions sample_projects/codegen/Cargo.nix

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
433 changes: 433 additions & 0 deletions sample_projects/rocksdb/Cargo.lock

Large diffs are not rendered by default.

1,727 changes: 1,727 additions & 0 deletions sample_projects/rocksdb/Cargo.nix

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions sample_projects/rocksdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "rocksdb"
version = "0.1.0"
authors = ["Peter Kolloch <info@eigenvalue.net>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

# https://github.com/kolloch/crate2nix/issues/33
[dependencies.rocksdb]
git = "https://github.com/rust-rocksdb/rust-rocksdb"
rev = "bc8520a86e96c38f79caac0d09349a01cbd113e9"
branch = "0.12.2"
default-features = false
features = ["lz4"]
15 changes: 15 additions & 0 deletions sample_projects/rocksdb/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ pkgs ? import ../../nix/nixpkgs.nix { config = {}; }
, generatedCargoNix ? ./Cargo.nix {}
}:

let
cargoNix = pkgs.callPackage generatedCargoNix {
defaultCrateOverrides = {
librocksdb-sys = attrs: {
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib";
buildInputs = with pkgs; [ clang ];
};
};
};
in
cargoNix.rootCrate.build
3 changes: 3 additions & 0 deletions sample_projects/rocksdb/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
Loading

0 comments on commit 2a440a1

Please sign in to comment.