1 { lib, stdenv, fetchFromGitHub, fetchpatch
4 stdenv.mkDerivation rec {
8 src = fetchFromGitHub {
12 sha256 = "1qwix75z749628w583fwp7m7kxbj0k3g159sxb7vgqxbadqqz1ab";
16 # Pull upstream fix for -fno-common toolchains.
18 name = "fno-common.patch";
19 url = "https://github.com/OpenRTX/dmrconfig/commit/1a6901488db26262a6b69f80b0e795864e9e8d0a.patch";
20 sha256 = "03px1y95a8aspd251i1jj8ggqfjvkqby4lhn5pb7l5c1lzh6h762";
29 substituteInPlace Makefile \
30 --replace /usr/local/bin/dmrconfig $out/bin/dmrconfig
33 makeFlags = [ "VERSION=${version}" "GITCOUNT=0" ];
36 mkdir -p $out/bin $out/lib/udev/rules.d
38 install 99-dmr.rules $out/lib/udev/rules.d/99-dmr.rules
42 description = "Configuration utility for DMR radios";
44 DMRconfig is a utility for programming digital radios via USB programming cable.
46 homepage = "https://github.com/sergev/dmrconfig";
47 license = licenses.asl20;
49 platforms = platforms.linux;
50 mainProgram = "dmrconfig";