I wanto to build a rust package which depends on lubudev-sys,itself depending on libudev.
Based on the manual I’ve got
with(
import <nixpkgs> {
overlays = [ (import ./overlay.nix) ];
}
);asusctl.override (
o: {
crateOverrides = defaultCrateOverrides // {
libudev-sys = a: {
buildInputs = [ pkg-config libudev ];
};
};
}
)
final: prev: {
asusctl = final.callPackage ./pkg.nix {};
}
{ lib, rustPlatform, fetchFromGitLab, pkg-config, libudev, defaultCrateOverrides }:
rustPlatform.buildRustPackage rec {
pname = "asusctl";
version = "3.7.2";
src = fetchFromGitLab {
owner = "asus-linux";
repo = pname;
rev = version;
sha256 = "1486hbs1lnnw9yvj7n7l4lpwsmi0darh94hbw2fwwbsahalkbsr2";
};
cargoSha256 = "0xd66p3v50g22cqqa56k2g2xakmbg3zfwd9fikh7xwkyj9l0n6ry";
meta = with lib; {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = "https://github.com/BurntSushi/ripgrep";
license = licenses.unlicense;
maintainers = [ maintainers.tailhook ];
};
}
but nix-build
fails with
error: anonymous function at ~/src/nixos/dev/asus/pkg.nix:1:1 called with unexpected argument 'crateOverrides'
at /nix/store/02kpag0vgfj1qi7bfwkipp74f1svzag0-source/lib/customisation.nix:69:16:
68| let
69| result = f origArgs;
| ^
70|
What am I doing wrong?