2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2014-03-09 12:23:46 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "can-utils";
|
2014-03-09 12:23:46 +00:00
|
|
|
# There are no releases (source archives or git tags), so use the date of the
|
|
|
|
# latest commit in git master as version number.
|
2017-09-05 12:52:56 +01:00
|
|
|
version = "20170830";
|
2014-03-09 12:23:46 +00:00
|
|
|
|
2015-07-12 18:36:25 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linux-can";
|
|
|
|
repo = "can-utils";
|
2017-09-05 12:52:56 +01:00
|
|
|
rev = "5b518a0a5fa56856f804372a6b99b518dedb5386";
|
|
|
|
sha256 = "1ygzp8rjr8f1gs48mb1pz7psdgbfhlvr6kjdnmzbsqcml06zvrpr";
|
2014-03-09 12:23:46 +00:00
|
|
|
};
|
|
|
|
|
2020-02-20 20:16:50 +00:00
|
|
|
# Fixup build with newer Linux headers.
|
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <linux/sockios.h>' -i \
|
|
|
|
slcanpty.c cansniffer.c canlogserver.c isotpdump.c isotpsniffer.c isotpperf.c
|
|
|
|
'';
|
|
|
|
|
2014-03-09 12:23:46 +00:00
|
|
|
preConfigure = ''makeFlagsArray+=(PREFIX="$out")'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-03-09 12:23:46 +00:00
|
|
|
description = "CAN userspace utilities and tools (for use with Linux SocketCAN)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/linux-can/can-utils";
|
2014-03-09 12:23:46 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|