1{ stdenv, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4 name = "can-utils-${version}";
5 # There are no releases (source archives or git tags), so use the date of the
6 # latest commit in git master as version number.
7 version = "20170830";
8
9 src = fetchFromGitHub {
10 owner = "linux-can";
11 repo = "can-utils";
12 rev = "5b518a0a5fa56856f804372a6b99b518dedb5386";
13 sha256 = "1ygzp8rjr8f1gs48mb1pz7psdgbfhlvr6kjdnmzbsqcml06zvrpr";
14 };
15
16 preConfigure = ''makeFlagsArray+=(PREFIX="$out")'';
17
18 meta = with stdenv.lib; {
19 description = "CAN userspace utilities and tools (for use with Linux SocketCAN)";
20 homepage = https://github.com/linux-can/can-utils;
21 license = licenses.gpl2Plus;
22 platforms = platforms.linux;
23 maintainers = [ maintainers.bjornfor ];
24 };
25}