i2c-tools: switch to fetchgit and separate man

and clarify license
This commit is contained in:
Evils 2021-05-01 16:27:49 +02:00 committed by Jonathan Ringer
parent 773f051c87
commit c78b9b47cf

@ -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;
};