forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
43 lines
1,017 B
Nix
43 lines
1,017 B
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, libusb1, systemd }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dmrconfig";
|
|
version = "1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sergev";
|
|
repo = "dmrconfig";
|
|
rev = version;
|
|
sha256 = "1qwix75z749628w583fwp7m7kxbj0k3g159sxb7vgqxbadqqz1ab";
|
|
};
|
|
|
|
buildInputs = [
|
|
libusb1 systemd
|
|
];
|
|
|
|
preConfigure = ''
|
|
substituteInPlace Makefile \
|
|
--replace /usr/local/bin/dmrconfig $out/bin/dmrconfig
|
|
'';
|
|
|
|
makeFlags = [ "VERSION=${version}" "GITCOUNT=0" ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/lib/udev/rules.d
|
|
make install
|
|
install 99-dmr.rules $out/lib/udev/rules.d/99-dmr.rules
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Configuration utility for DMR radios";
|
|
longDescription = ''
|
|
DMRconfig is a utility for programming digital radios via USB programming cable.
|
|
'';
|
|
homepage = "https://github.com/sergev/dmrconfig";
|
|
license = licenses.asl20;
|
|
maintainers = [ maintainers.etu ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|