2022-05-20 07:44:24 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
2018-10-24 16:47:55 +00:00
|
|
|
, libusb1, systemd }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "dmrconfig";
|
2018-12-27 14:11:28 +00:00
|
|
|
version = "1.1";
|
2018-10-24 16:47:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sergev";
|
|
|
|
repo = "dmrconfig";
|
2018-12-03 13:53:23 +00:00
|
|
|
rev = version;
|
2018-12-27 14:11:28 +00:00
|
|
|
sha256 = "1qwix75z749628w583fwp7m7kxbj0k3g159sxb7vgqxbadqqz1ab";
|
2018-10-24 16:47:55 +00:00
|
|
|
};
|
|
|
|
|
2022-05-20 07:44:24 +00:00
|
|
|
patches = [
|
|
|
|
# Pull upstream fix for -fno-common toolchains.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/OpenRTX/dmrconfig/commit/1a6901488db26262a6b69f80b0e795864e9e8d0a.patch";
|
|
|
|
sha256 = "03px1y95a8aspd251i1jj8ggqfjvkqby4lhn5pb7l5c1lzh6h762";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-10-24 16:47:55 +00:00
|
|
|
buildInputs = [
|
|
|
|
libusb1 systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2018-12-03 13:53:23 +00:00
|
|
|
substituteInPlace Makefile \
|
2018-12-27 14:11:28 +00:00
|
|
|
--replace /usr/local/bin/dmrconfig $out/bin/dmrconfig
|
2018-10-24 16:47:55 +00:00
|
|
|
'';
|
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "VERSION=${version}" "GITCOUNT=0" ];
|
2018-12-27 14:11:28 +00:00
|
|
|
|
2018-11-07 17:32:42 +00: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 16:47:55 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-24 16:47:55 +00:00
|
|
|
description = "Configuration utility for DMR radios";
|
|
|
|
longDescription = ''
|
|
|
|
DMRconfig is a utility for programming digital radios via USB programming cable.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/sergev/dmrconfig";
|
2018-10-24 16:47:55 +00:00
|
|
|
license = licenses.asl20;
|
2022-07-14 12:39:58 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-10-24 16:47:55 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|