2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2018-10-24 18:47:55 +02:00
|
|
|
, libusb1, systemd }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "dmrconfig";
|
2018-12-27 15:11:28 +01:00
|
|
|
version = "1.1";
|
2018-10-24 18:47:55 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sergev";
|
|
|
|
repo = "dmrconfig";
|
2018-12-03 14:53:23 +01:00
|
|
|
rev = version;
|
2018-12-27 15:11:28 +01:00
|
|
|
sha256 = "1qwix75z749628w583fwp7m7kxbj0k3g159sxb7vgqxbadqqz1ab";
|
2018-10-24 18:47:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libusb1 systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2018-12-03 14:53:23 +01:00
|
|
|
substituteInPlace Makefile \
|
2018-12-27 15:11:28 +01:00
|
|
|
--replace /usr/local/bin/dmrconfig $out/bin/dmrconfig
|
2018-10-24 18:47:55 +02:00
|
|
|
'';
|
|
|
|
|
2019-10-27 14:03:25 +01:00
|
|
|
makeFlags = [ "VERSION=${version}" "GITCOUNT=0" ];
|
2018-12-27 15:11:28 +01:00
|
|
|
|
2018-11-07 18:32:42 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib/udev/rules.d
|
|
|
|
make install
|
|
|
|
install 99-dmr.rules $out/lib/udev/rules.d/99-dmr.rules
|
2018-10-24 18:47:55 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-10-24 18:47:55 +02:00
|
|
|
description = "Configuration utility for DMR radios";
|
|
|
|
longDescription = ''
|
|
|
|
DMRconfig is a utility for programming digital radios via USB programming cable.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/sergev/dmrconfig";
|
2018-10-24 18:47:55 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.etu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|