summary refs log tree commit diff
path: root/pkgs/os-specific/linux/i2c-tools
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2015-05-18 01:43:13 +0300
committerBjørn Forsman <bjorn.forsman@gmail.com>2015-06-15 17:49:35 +0200
commit2c9b93b01c471a4d933ae05e36504c6f26d1f08b (patch)
tree1c5e2ff415b5e59e3bde2f70049c851c31a45d00 /pkgs/os-specific/linux/i2c-tools
parent7233ca0488707c23bac26914f41dea2513cd9ab3 (diff)
downloadnixlib-2c9b93b01c471a4d933ae05e36504c6f26d1f08b.tar
nixlib-2c9b93b01c471a4d933ae05e36504c6f26d1f08b.tar.gz
nixlib-2c9b93b01c471a4d933ae05e36504c6f26d1f08b.tar.bz2
nixlib-2c9b93b01c471a4d933ae05e36504c6f26d1f08b.tar.lz
nixlib-2c9b93b01c471a4d933ae05e36504c6f26d1f08b.tar.xz
nixlib-2c9b93b01c471a4d933ae05e36504c6f26d1f08b.tar.zst
nixlib-2c9b93b01c471a4d933ae05e36504c6f26d1f08b.zip
i2c-tools: New package at version 3.1.1
Diffstat (limited to 'pkgs/os-specific/linux/i2c-tools')
-rw-r--r--pkgs/os-specific/linux/i2c-tools/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/i2c-tools/default.nix b/pkgs/os-specific/linux/i2c-tools/default.nix
new file mode 100644
index 000000000000..5cac6069e727
--- /dev/null
+++ b/pkgs/os-specific/linux/i2c-tools/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, perl, read-edid }:
+
+stdenv.mkDerivation rec {
+  name = "i2c-tools-${version}";
+  version = "3.1.1";
+
+  src = fetchurl {
+    url = "http://dl.lm-sensors.org/i2c-tools/releases/${name}.tar.bz2";
+    sha256 = "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l";
+  };
+
+  buildInputs = [ perl ];
+
+  patchPhase = ''
+    substituteInPlace eeprom/decode-edid --replace "/usr/sbin/parse-edid" "${read-edid}/bin/parse-edid"
+    substituteInPlace stub/i2c-stub-from-dump --replace "/sbin/" ""
+  '';
+
+  installPhase = ''
+    make install prefix=$out
+    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";
+    homepage = http://www.lm-sensors.org/wiki/I2CTools;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.linux;
+  };
+}