nixpkgs/pkgs/by-name/ch/chirp/package.nix

86 lines
1.6 KiB
Nix

{
lib,
fetchFromGitHub,
writeShellScript,
glib,
gsettings-desktop-schemas,
python3Packages,
unstableGitUpdater,
wrapGAppsHook3,
}:
python3Packages.buildPythonApplication {
pname = "chirp";
version = "0.4.0-unstable-2024-11-22";
pyproject = true;
src = fetchFromGitHub {
owner = "kk7ds";
repo = "chirp";
rev = "5b41e67d5e261da85523789e0d1e7ac377f419f6";
hash = "sha256-a1UAnSqQyud812NOxqn/PukW5PrIN0MxdEfr9jIvncY=";
};
nativeBuildInputs = [
wrapGAppsHook3
];
buildInputs = [
glib
gsettings-desktop-schemas
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
pyserial
requests
yattag
suds
wxpython
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-xdist
ddt
pyyaml
];
postPatch = ''
substituteInPlace chirp/locale/Makefile \
--replace-fail /usr/bin/find find
'';
preBuild = ''
make -C chirp/locale
'';
preCheck = ''
export HOME="$TMPDIR"
'';
# many upstream test failures
doCheck = false;
passthru.updateScript = unstableGitUpdater {
tagConverter = writeShellScript "chirp-tag-converter.sh" ''
sed -e 's/^release_//g' -e 's/_/./g'
'';
};
meta = {
description = "Free, open-source tool for programming your amateur radio";
homepage = "https://chirp.danplanet.com/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
emantor
wrmilling
nickcao
];
platforms = lib.platforms.linux;
};
}