Building `rustChannelOf({...}).rust-src` from `rust-overlay.nix` errors.
calbrecht opened this issue · 6 comments
Don't know if i am supposed to be able to do that, however until f6fe850 was merged, i was able to do so by using the overlay like:
...
rustStable = (prev.rustStable or { }) // (prev.rustChannelOf or pkgs.rustChannelOf) {
sha256 = "sha256-oro0HsosbLRAuZx68xd0zfgPl6efNj2AQruKRq3KA2g="; #2022-05-24
channel = "stable";
};
rust-stable = final.rustStable.rust // final.rust-analyzer;
rust-src-stable = final.rustStable.rust-src;
Although, now after the mentioned commit, the build of rust-src-stable
errors and exits and therefore fails the build, when chmod
and after fixing that, also realpath -e
are complaining about missing arguments.
I have to admit that this overlay is over my head, as well as the circumstance that the ls
check is failing to protect against the non-existance of the librustc-driver-*.so
library.
I seem to be getting this as well trying to install on aarch64-darwin and using nix develop
. Works fine on x86_64-linux.
Previously this was working.
error: builder for '/nix/store/lmx39jmjn1xh9dnvab13b39rhv2pd1qp-rust-1.68.0-2023-03-06-2c8cc3432.drv' failed with exit code 1;
last 10 log lines:
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> /private/tmp/nix-build-rust-1.68.0-2023-03-06-2c8cc3432.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90: line 18: patchelf: command not found
> realpath: missing operand
> Try 'realpath --help' for more information.
For full logs, run 'nix log /nix/store/lmx39jmjn1xh9dnvab13b39rhv2pd1qp-rust-1.68.0-2023-03-06-2c8cc3432.drv'.
error: 1 dependencies of derivation '/nix/store/md5aq8fhajxjvdqw4fklb37bnlyyparl-nix-shell-env.drv' failed to build
Shell setup:
// flake.nix (truncated)
{
description = "My NixOS Hosts";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware";
# Rust
mozpkgs = {
url = "github:mozilla/nixpkgs-mozilla";
};
};
outputs = { self, nixpkgs, mozpkgs, ... }@inputs:
let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
#"aarch64-linux"
#"i686-linux"
"x86_64-linux"
"aarch64-darwin"
#"x86_64-darwin"
];
in
rec {
overlays = import ./overlays;
legacyPackages = forAllSystems (system:
import nixpkgs {
inherit system;
overlays = with overlays; [ additions mozpkgs.overlays.rust ];
config.allowUnfree = true;
}
);
# Devshell for bootstrapping
# Acessible through 'nix develop' or 'nix-shell' (legacy)
devShells = forAllSystems (system:
let pkgs = legacyPackages.${system};
in import ./shell.nix { inherit pkgs; }
);
};
};
// shell.nix
{ pkgs ? (import ./nixpkgs.nix) { } }: {
default = pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [ nix git ];
};
rust = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
rust-analyzer # the one from Mozilla is slightly broken https://github.com/mozilla/nixpkgs-mozilla/issues/238
latest.rustChannels.stable.rust
pkg-config
openssl
];
};
}
shell is invoked with: nix develop --impure ~/nix-config#rust --command zsh
I'm running into this issue as well. I'm new to nix so any help or guidance would be appreciated.
I am hitting this too.