Files
nixpkgs/pkgs/by-name/rw/rwedid/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

53 lines
1.3 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitea,
pkg-config,
udevCheckHook,
xz,
}:
rustPlatform.buildRustPackage rec {
pname = "rwedid";
version = "0.3.2";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "ral";
repo = "rwedid";
rev = version;
hash = "sha256-lbZD/QLCgkD5OQZdn6oCjry9edMcJ+q9qGF7IbY36U4=";
};
cargoHash = "sha256-oOopJanCFva2Z6/N3IwQTQ3pTd/xnJ82LyQ6iO47uVE=";
nativeBuildInputs = [
pkg-config
udevCheckHook
];
buildInputs = [
xz
];
doInstallCheck = true;
postInstall = ''
mkdir -p $out/etc/udev/rules.d
echo 'SUBSYSTEM=="i2c-dev",KERNEL=="i2c-[0-9]*", ATTRS{class}=="0x030000", TAG+="uaccess"' > $out/etc/udev/rules.d/60-rwedid.rules
'';
meta = with lib; {
description = "Read and write EDID data over an I2C bus";
longDescription = ''
To install udev rules, you also have to add `services.udev.packages = [ pkgs.rwedid ]` into your configuration.
Additionally you will also have to create the i2c group, on NixOS this can be done using `users.groups.i2c = {};`.
And you will have to load i2c-dev kernel module, for that add `boot.initrd.availableKernelModules = [ i2c-dev ] to your config.
'';
homepage = "https://codeberg.org/ral/rwedid";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ ];
};
}