I was trying to create derivation for regolith-powerd and this error popped up in which there is an extra ` after the link from where it is fetching crates.
Updating crates.io index
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: github.com); class=Net (12)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: github.com); class=Net (12)
error: Unable to update registry `crates-io`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Derivation expresssion -
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/06278c77b5d162e62df170fec307e83f1812d94b.tar.gz") {}}:
pkgs.stdenv.mkDerivation {
pname = "regolith-powerd";
version = "v0.1";
src = pkgs.fetchFromGitHub {
owner = "regolith-linux";
repo = "regolith-powerd";
rev = "master";
sha256 = "uXTGzbV0ASCq7s5L+su6j0Ol0P1cIVj0QnNVxH6ljXM=";
};
buildInputs = with pkgs; [
gnumake
cargo
rustc
gcc
clang
pkg-config
glib
];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share
cp -r target/release/regolith-powerd $out/bin
'';
}
Can anyone tell me if I am doing something the wrong way?