fb4a93a913
fetchzip is more efficient, because it doesn't do a full git clone, so it should be preferred where possible. Where hashes have not been changed, I have verified that they don't need to be. Where hashes have changed, in all cases this is because of .gitattributes files that exclude certain files from the tarball, and in these cases I have verified that the packages still build. sbsigntool still uses fetchgit because it has a submodule, and ell and iwd still use fetchgit because git.kernel.org does not provide snapshot links for them. Apparently this is intentional.
43 lines
1 KiB
Nix
43 lines
1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchzip
|
|
, perl
|
|
, read-edid
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "i2c-tools";
|
|
version = "4.3";
|
|
|
|
src = fetchzip {
|
|
url = "https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/snapshot/i2c-tools-v${version}.tar.gz";
|
|
sha256 = "sha256-HlmIocum+HZEKNiS5BUwEIswRfTMUhD1vCPibAuAK0Q=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|