Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chirp: modernize the expression by using buildPythonApplication #74518

Merged
merged 1 commit into from Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 9 additions & 20 deletions pkgs/applications/radio/chirp/default.nix
@@ -1,31 +1,20 @@
{ stdenv, fetchurl, libxml2Python, libxslt, makeWrapper
, pyserial, pygtk }:

stdenv.mkDerivation rec {
{ stdenv
, fetchurl
, python2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it not work with Python 3?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my best guess is there's a branch with it https://chirp.danplanet.com/projects/chirp/wiki/Linux_Python3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The port isn't really complete and has a bunch of issues. Last I checked the first thing I saw was incompatible exception syntax.

}:
python2.pkgs.buildPythonApplication rec {
pname = "chirp-daily";
version = "20190925";
version = "20191123";

src = fetchurl {
url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${pname}-${version}.tar.gz";
sha256 = "0immgss7nj7395r3csiypksnbn1r2f3j45c5v8qpybz65lpbplps";
sha256 = "11wzk0c9fa3gp185gyd47g3sh7gfallw7qapr6qp913q2zfmif8v";
};

nativeBuildInputs = [ makeWrapper ];
buildInputs = [
pyserial pygtk libxml2Python libxslt
propagatedBuildInputs = with python2.pkgs; [
pygtk pyserial libxml2
];

installPhase = ''
mkdir -p $out/bin $out/share/chirp
cp -r . $out/share/chirp/
ln -s $out/share/chirp/chirpw $out/bin/chirpw

for file in "$out"/bin/*; do
wrapProgram "$file" \
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out")
done
'';

meta = with stdenv.lib; {
description = "A free, open-source tool for programming your amateur radio";
homepage = https://chirp.danplanet.com/;
Expand Down
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -18183,9 +18183,7 @@ in

cgminer = callPackage ../applications/misc/cgminer { };

chirp = callPackage ../applications/radio/chirp {
inherit (pythonPackages) pyserial pygtk;
};
chirp = callPackage ../applications/radio/chirp { };

browsh = callPackage ../applications/networking/browsers/browsh { };

Expand Down