summary refs log tree commit diff
path: root/pkgs/os-specific/linux/i2c-tools
diff options
context:
space:
mode:
authorEvils <evils.devils@protonmail.com>2021-05-01 16:27:49 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-08 13:23:36 -0700
commitc78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e (patch)
tree86e035a0713e225516dd86674ff2bac914fd2605 /pkgs/os-specific/linux/i2c-tools
parent773f051c8753bf8a8616d81a37d42191e18f0368 (diff)
downloadnixpkgs-c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e.tar
nixpkgs-c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e.tar.gz
nixpkgs-c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e.tar.bz2
nixpkgs-c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e.tar.lz
nixpkgs-c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e.tar.xz
nixpkgs-c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e.tar.zst
nixpkgs-c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e.zip
i2c-tools: switch to fetchgit and separate man
and clarify license
Diffstat (limited to 'pkgs/os-specific/linux/i2c-tools')
-rw-r--r--pkgs/os-specific/linux/i2c-tools/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/i2c-tools/default.nix b/pkgs/os-specific/linux/i2c-tools/default.nix
index 23bc89b7d1c..5c05ca6082e 100644
--- a/pkgs/os-specific/linux/i2c-tools/default.nix
+++ b/pkgs/os-specific/linux/i2c-tools/default.nix
@@ -1,12 +1,18 @@
-{ lib, stdenv, fetchurl, perl, read-edid }:
+{ lib
+, stdenv
+, fetchgit
+, perl
+, read-edid
+}:
 
 stdenv.mkDerivation rec {
   pname = "i2c-tools";
   version = "4.2";
 
-  src = fetchurl {
-    url = "https://www.kernel.org/pub/software/utils/i2c-tools/${pname}-${version}.tar.xz";
-    sha256 = "1mmc1n8awl3winyrp1rcxg94vjsx9dc1y7gj7y88blc2f2ydmwip";
+  src = fetchgit {
+    url = "https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git";
+    rev = "v${version}";
+    sha256 = "0vqrbp10klr7ylarr6cy1q7nafiqaky4iq5my5dqy101h93vg4pg";
   };
 
   buildInputs = [ perl ];
@@ -18,6 +24,8 @@ stdenv.mkDerivation rec {
 
   makeFlags = [ "PREFIX=${placeholder "out"}" ];
 
+  outputs = [ "out" "man" ];
+
   postInstall = ''
     rm -rf $out/include # Installs include/linux/i2c-dev.h that conflics with kernel headers
   '';
@@ -25,7 +33,8 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Set of I2C tools for Linux";
     homepage = "https://i2c.wiki.kernel.org/index.php/I2C_Tools";
-    license = licenses.gpl2;
+    # library is LGPL 2.1 or later; "most tools" GPL 2 or later
+    license = with licenses; [ lgpl21Plus gpl2Plus ];
     maintainers = [ maintainers.dezgeg ];
     platforms = platforms.linux;
   };