2021-11-21 16:45:58 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2021-07-20 19:15:03 +00:00
|
|
|
, pkgsCross
|
|
|
|
, avrdude
|
|
|
|
, dfu-programmer
|
|
|
|
, dfu-util
|
|
|
|
, gcc-arm-embedded
|
2022-01-20 16:53:24 +00:00
|
|
|
, teensy-loader-cli
|
2021-11-21 16:45:58 +00:00
|
|
|
}:
|
2021-04-02 17:00:18 +00:00
|
|
|
|
2021-11-21 16:45:58 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2021-04-02 17:00:18 +00:00
|
|
|
pname = "qmk";
|
2022-06-05 16:15:25 +00:00
|
|
|
version = "1.1.0";
|
2021-04-02 17:00:18 +00:00
|
|
|
|
2021-11-21 16:45:58 +00:00
|
|
|
src = python3.pkgs.fetchPypi {
|
2021-04-02 17:00:18 +00:00
|
|
|
inherit pname version;
|
2022-06-05 16:15:25 +00:00
|
|
|
sha256 = "sha256-dxV3yeaOt/4IlpurNq60IHE6UlBi3OUqBu2kDajNpeE=";
|
2021-04-02 17:00:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
2021-06-23 03:36:20 +00:00
|
|
|
flake8
|
|
|
|
nose2
|
|
|
|
pep8-naming
|
2021-04-02 17:00:18 +00:00
|
|
|
setuptools-scm
|
2021-06-23 03:36:20 +00:00
|
|
|
yapf
|
2021-04-02 17:00:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-06-23 03:36:20 +00:00
|
|
|
appdirs
|
|
|
|
argcomplete
|
|
|
|
colorama
|
2021-09-07 09:20:44 +00:00
|
|
|
qmk-dotty-dict
|
2021-06-23 03:36:20 +00:00
|
|
|
hid
|
|
|
|
hjson
|
|
|
|
jsonschema
|
2021-04-02 17:00:18 +00:00
|
|
|
milc
|
2021-06-23 03:36:20 +00:00
|
|
|
pygments
|
|
|
|
pyusb
|
2022-06-05 16:15:25 +00:00
|
|
|
pillow
|
2021-07-20 19:15:03 +00:00
|
|
|
] ++ [ # Binaries need to be in the path so this is in propagatedBuildInputs
|
|
|
|
avrdude
|
|
|
|
dfu-programmer
|
|
|
|
dfu-util
|
2022-01-20 16:53:24 +00:00
|
|
|
teensy-loader-cli
|
2021-07-20 19:15:03 +00:00
|
|
|
gcc-arm-embedded
|
|
|
|
pkgsCross.avr.buildPackages.binutils
|
2022-01-20 16:54:32 +00:00
|
|
|
pkgsCross.avr.buildPackages.binutils.bintools
|
2021-07-20 19:15:03 +00:00
|
|
|
pkgsCross.avr.buildPackages.gcc8
|
|
|
|
pkgsCross.avr.libcCross
|
2021-04-02 17:00:18 +00:00
|
|
|
];
|
|
|
|
|
2021-11-21 16:45:58 +00:00
|
|
|
# buildPythonApplication requires setup.py; the setup.py file crafted below
|
|
|
|
# acts as a wrapper to setup.cfg
|
2021-09-07 09:20:44 +00:00
|
|
|
postConfigure = ''
|
2021-11-21 16:45:58 +00:00
|
|
|
touch setup.py
|
|
|
|
echo "from setuptools import setup" >> setup.py
|
|
|
|
echo "setup()" >> setup.py
|
2021-09-07 09:20:44 +00:00
|
|
|
'';
|
|
|
|
|
2021-04-02 17:00:18 +00:00
|
|
|
# no tests implemented
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/qmk/qmk_cli";
|
2021-06-23 03:36:20 +00:00
|
|
|
description = "A program to help users work with QMK Firmware";
|
|
|
|
longDescription = ''
|
|
|
|
qmk_cli is a companion tool to QMK firmware. With it, you can:
|
|
|
|
|
|
|
|
- Interact with your qmk_firmware tree from any location
|
|
|
|
- Use qmk clone to pull down anyone's qmk_firmware fork
|
|
|
|
- Setup and work with your build environment:
|
|
|
|
- qmk setup
|
|
|
|
- qmk doctor
|
|
|
|
- qmk compile
|
|
|
|
- qmk console
|
|
|
|
- qmk flash
|
|
|
|
- qmk lint
|
|
|
|
- ... and many more!
|
|
|
|
'';
|
2021-04-02 17:00:18 +00:00
|
|
|
license = licenses.mit;
|
2021-07-20 19:15:03 +00:00
|
|
|
maintainers = with maintainers; [ bhipple babariviere ekleog ];
|
2021-04-02 17:00:18 +00:00
|
|
|
};
|
|
|
|
}
|