From 040ec873821d23e168a59b7ee21697fe0af5bb4c Mon Sep 17 00:00:00 2001 From: tilpner Date: Tue, 25 Sep 2018 15:58:57 +0200 Subject: Initial commit --- hello/Cargo.lock | 4 ++++ hello/Cargo.nix | 26 ++++++++++++++++++++++++++ hello/Cargo.toml | 6 ++++++ hello/crates-io.nix | 8 ++++++++ hello/src/main.rs | 3 +++ 5 files changed, 47 insertions(+) create mode 100644 hello/Cargo.lock create mode 100644 hello/Cargo.nix create mode 100644 hello/Cargo.toml create mode 100644 hello/crates-io.nix create mode 100644 hello/src/main.rs (limited to 'hello') diff --git a/hello/Cargo.lock b/hello/Cargo.lock new file mode 100644 index 0000000..15b9446 --- /dev/null +++ b/hello/Cargo.lock @@ -0,0 +1,4 @@ +[[package]] +name = "hello" +version = "0.1.0" + diff --git a/hello/Cargo.nix b/hello/Cargo.nix new file mode 100644 index 0000000..4db6737 --- /dev/null +++ b/hello/Cargo.nix @@ -0,0 +1,26 @@ +# Generated by carnix 0.8.5: /home/till/.cargo/bin/carnix nix --src ./. +{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }: +with buildRustCrateHelpers; +let inherit (lib.lists) fold; + inherit (lib.attrsets) recursiveUpdate; +in +let crates = cratesIO // rec { + crates.hello."0.1.0" = deps: { features?(features_.hello."0.1.0" deps {}) }: buildRustCrate { + crateName = "hello"; + version = "0.1.0"; + authors = [ "till" ]; + src = ./.; + }; + features_.hello."0.1.0" = deps: f: updateFeatures f (rec { + hello."0.1.0".default = (f.hello."0.1.0".default or true); + }) []; + + + +}; in + +rec { + hello = crates.crates.hello."0.1.0" deps; + __all = [ (hello {}) ]; + deps.hello."0.1.0" = {}; +} diff --git a/hello/Cargo.toml b/hello/Cargo.toml new file mode 100644 index 0000000..e968470 --- /dev/null +++ b/hello/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "hello" +version = "0.1.0" +authors = ["till"] + +[dependencies] diff --git a/hello/crates-io.nix b/hello/crates-io.nix new file mode 100644 index 0000000..7a0e584 --- /dev/null +++ b/hello/crates-io.nix @@ -0,0 +1,8 @@ +{ lib, buildRustCrate, buildRustCrateHelpers }: +with buildRustCrateHelpers; +let inherit (lib.lists) fold; + inherit (lib.attrsets) recursiveUpdate; +in +rec { + +} diff --git a/hello/src/main.rs b/hello/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/hello/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} -- cgit v1.2.3