nixpkgs/pkgs/os-specific/linux/i2c-tools/default.nix

33 lines
936 B
Nix
Raw Normal View History

{ stdenv, fetchurl, perl, read-edid }:
stdenv.mkDerivation rec {
name = "i2c-tools-${version}";
version = "4.1";
src = fetchurl {
i2c-tools: 3.1.2 -> 4.0 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. This update was made based on information from https://repology.org/metapackage/i2c-tools/versions. These checks were done: - built on NixOS - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-dimms -h` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-dimms --help` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-dimms help` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-dimms -h` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-dimms --help` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-vaio -h` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-vaio --help` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-vaio help` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid -h` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid --help` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid help` got 0 exit code - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid -V` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid -v` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid --version` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid version` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid -h` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid --help` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/decode-edid help` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/i2cdetect -V` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/i2cdump -V` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/i2cget -V` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/i2cset -V` and found version 4.0 - ran `/nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0/bin/i2ctransfer -V` and found version 4.0 - found 4.0 with grep in /nix/store/01psgfkqwlff69addbhp08xi5z2p3y7w-i2c-tools-4.0 - directory tree listing: https://gist.github.com/7e7d303f66bb0a865a35ab286258a07e
2018-03-30 00:43:54 +00:00
url = "https://www.kernel.org/pub/software/utils/i2c-tools/${name}.tar.xz";
sha256 = "1m97hpwqfaqjl9xvr4pvz2vdrsdvxbcn0nnx8pamnyc3s7pikcjp";
};
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"}" ];
postInstall = ''
rm -rf $out/include # Installs include/linux/i2c-dev.h that conflics with kernel headers
'';
meta = with stdenv.lib; {
description = "Set of I2C tools for Linux";
2018-09-03 20:14:32 +00:00
homepage = https://i2c.wiki.kernel.org/index.php/I2C_Tools;
license = licenses.gpl2;
maintainers = [ maintainers.dezgeg ];
platforms = platforms.linux;
};
}