From c78b9b47cfdef0cb0b6b0b4e0c5b1ee8bb2c4b0e Mon Sep 17 00:00:00 2001 From: Evils Date: Sat, 1 May 2021 16:27:49 +0200 Subject: [PATCH] i2c-tools: switch to fetchgit and separate man and clarify license --- pkgs/os-specific/linux/i2c-tools/default.nix | 19 ++++++++++++++----- 1 file 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 23bc89b7d1c9..5c05ca6082e4 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; };