diff options
Diffstat (limited to '_posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md')
-rw-r--r-- | _posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/_posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md b/_posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md index 7f427b6..4d4a8d5 100644 --- a/_posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md +++ b/_posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md @@ -23,19 +23,20 @@ Here's how to use it (snippet taken from the repo's README): ```nix let niv-sources = import ./nix/sources.nix; - pkgs = import niv-sources.nixpkgs { }; + mozilla-overlay = import niv-sources.nixpkgs-mozilla; + pkgs = import niv-sources.nixpkgs { overlays = [ mozilla-overlay ]; }; src = pkgs.nix-gitignore.gitignoreSource [ ] ./.; cargo2nix = pkgs.callPackage niv-sources.cargo2nix { lockfile = ./Cargo.lock; }; in pkgs.stdenv.mkDerivation { inherit src; - name = "cargo2nix-test"; - buildInputs = with pkgs; [ cargo ]; + name = "cargo-test"; + buildInputs = [ pkgs.latest.rustChannels.nightly.rust ]; phases = [ "unpackPhase" "buildPhase" ]; buildPhase = '' # Setup dependencies path to satisfy Cargo - mkdir .cargo/ vendor/ + mkdir .cargo/ ln -s ${cargo2nix.env.cargo-config} .cargo/config ln -s ${cargo2nix.env.vendor} vendor |