Fix Rust pinning

This commit is contained in:
Zhaofeng Li 2020-12-18 01:57:32 -08:00
parent d0ed138ef0
commit b3d84703f3
7 changed files with 17 additions and 2740 deletions

2717
Cargo.nix generated

File diff suppressed because it is too large Load diff

View file

@ -7,9 +7,9 @@ Colmena is still an early prototype.
## Tutorial ## Tutorial
Enter a `nix-shell` with `colmena` with: Enter a shell with `colmena` with:
``` ```
nix-shell test-shell.nix nix-shell
``` ```
Colmena should work with your existing NixOps and Morph configurations with minimal modification. Colmena should work with your existing NixOps and Morph configurations with minimal modification.

View file

@ -1,5 +1,14 @@
{ {
pkgs ? import ./pkgs.nix {}, pkgs ? import ./pkgs.nix {},
}: let }: let
cargo = pkgs.callPackage ./Cargo.nix {}; rustPlatform = if pkgs ? pinnedRust then pkgs.makeRustPlatform {
in cargo.rootCrate.build rustc = pkgs.pinnedRust;
cargo = pkgs.pinnedRust;
} else pkgs.rustPlatform;
in rustPlatform.buildRustPackage {
name = "colmena-dev";
version = "0.1.0";
src = ./.;
cargoSha256 = "06qw50wd8w9b6j7hayx75c9hvff9kxa0cllaqg8x854b1ww9pk8j";
}

View file

@ -2,6 +2,6 @@ let
pkgs = import ./pkgs.nix {}; pkgs = import ./pkgs.nix {};
in pkgs.mkShell { in pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
(import ./Cargo.nix {}).rootCrate.build pinnedRust
]; ];
} }

View file

@ -1,16 +1,4 @@
{ {
"crate2nix": {
"branch": "master",
"description": "nix build file generator for rust crates",
"homepage": "",
"owner": "kolloch",
"repo": "crate2nix",
"rev": "0c81027889259c6a45221a157f9c4a56e7235c85",
"sha256": "0wp1i83ralnz0v6a95122d0hfzwlg1281lvv3mzrxcxl8mka8z3n",
"type": "tarball",
"url": "https://github.com/kolloch/crate2nix/archive/0c81027889259c6a45221a157f9c4a56e7235c85.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": { "niv": {
"branch": "master", "branch": "master",
"description": "Easy dependency management for Nix projects", "description": "Easy dependency management for Nix projects",

View file

@ -11,11 +11,9 @@
date = rustNightly; date = rustNightly;
}; };
in rec { in rec {
rustc = rustChannel.rust.override { pinnedRust = rustChannel.rust.override {
extensions = [ "rust-src" ]; extensions = [ "rust-src" ];
}; };
inherit (rustChannel) cargo rust-fmt rust-std clippy;
crate2nix = super.callPackage sources.crate2nix {};
}) })
]; ];
}; };

View file

@ -1,8 +1,7 @@
let let
pkgs = import ./pkgs.nix {}; pkgs = import ./pkgs.nix {};
in pkgs.mkShell { in pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = [
#rust (import ./default.nix {})
crate2nix
]; ];
} }