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
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.

View file

@ -1,5 +1,14 @@
{
pkgs ? import ./pkgs.nix {},
}: let
cargo = pkgs.callPackage ./Cargo.nix {};
in cargo.rootCrate.build
rustPlatform = if pkgs ? pinnedRust then pkgs.makeRustPlatform {
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 {};
in pkgs.mkShell {
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": {
"branch": "master",
"description": "Easy dependency management for Nix projects",

View file

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

View file

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