Skip to content

Commit

Permalink
fix: compatibility with recent nixpkgs
Browse files Browse the repository at this point in the history
For some reason, using the nixpkgs-mozilla Rust overlay is broken with
recent nixpkgs... or something like that. Just commenting it out for
now.

        error: attribute 'pkg' missing

               at /nix/store/jqchl81vqqxs15h9zyfy7m7azchpcpjd-source/rust-overlay.nix:263:19:

                  262|     in
                  263|     flip mapAttrs pkgs.pkg (name: pkg:
                     |                   ^
                  264|       makeOverridable ({extensions, targets, targetExtensions}:# Please enter the commit message for your changes. Lines starting
  • Loading branch information
cole-h committed Dec 24, 2021
1 parent 0bfd2f3 commit 73e0733
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions flake.nix
Expand Up @@ -16,27 +16,27 @@
genAttrs = names: f: builtins.listToAttrs (map (n: nameValuePair n (f n)) names);
allSystems = [ "x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin" ];

rustOverlay = final: prev:
let
rustChannel = prev.rustChannelOf {
channel = "1.47.0";
sha256 = "1hkisci4as93hx8ybf13bmxkj9jsvd4a9ilvjmw6n64w4jkc1nk9";
};
in
{
inherit rustChannel;
rustc = rustChannel.rust;
cargo = rustChannel.rust;
};
# rustOverlay = final: prev:
# let
# rustChannel = prev.rustChannelOf {
# channel = "1.47.0";
# sha256 = "1hkisci4as93hx8ybf13bmxkj9jsvd4a9ilvjmw6n64w4jkc1nk9";
# };
# in
# {
# inherit rustChannel;
# rustc = rustChannel.rust;
# cargo = rustChannel.rust;
# };

forAllSystems = f: genAttrs allSystems (system: f {
inherit system;
pkgs = import nixpkgs {
inherit system;
overlays = [
(import "${mozilla}/rust-overlay.nix")
rustOverlay
];
# overlays = [
# (import "${mozilla}/rust-overlay.nix")
# rustOverlay
# ];
};
});

Expand Down Expand Up @@ -69,7 +69,7 @@
buildInputs = with pkgs; [
# rustChannel.rust provides tools like clippy, rustfmt, cargo,
# rust-analyzer, rustc, and more.
(rustChannel.rust.override { extensions = [ "rust-src" ]; })
# (rustChannel.rust.override { extensions = [ "rust-src" ]; })
crate2nix.${system}
];
});
Expand Down

0 comments on commit 73e0733

Please sign in to comment.