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
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
perl,
|
|
read-edid,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "i2c-tools";
|
|
version = "4.4";
|
|
|
|
src = fetchzip {
|
|
url = "https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/snapshot/i2c-tools-v${version}.tar.gz";
|
|
sha256 = "sha256-Zm83gxdZH2XQCc/Dihp7vumF9WAvKgt6OORns5Mua7M=";
|
|
};
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace eeprom/decode-edid \
|
|
--replace "/usr/sbin/parse-edid" "${read-edid}/bin/parse-edid"
|
|
|
|
substituteInPlace stub/i2c-stub-from-dump \
|
|
--replace "/sbin/" ""
|
|
'';
|
|
|
|
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
outputs = [
|
|
"out"
|
|
"man"
|
|
];
|
|
|
|
postInstall = ''
|
|
rm -rf $out/include/linux/i2c-dev.h # conflics with kernel headers
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Set of I2C tools for Linux";
|
|
homepage = "https://i2c.wiki.kernel.org/index.php/I2C_Tools";
|
|
# library is LGPL 2.1 or later; "most tools" GPL 2 or later
|
|
license = with licenses; [
|
|
lgpl21Plus
|
|
gpl2Plus
|
|
];
|
|
maintainers = [ maintainers.dezgeg ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|