make flake and allow overriding conf.py

This commit is contained in:
2022-08-28 05:58:42 +02:00
parent 3c950be930
commit c450c6710b
3 changed files with 70 additions and 47 deletions

View File

@@ -1,50 +1,7 @@
{ lib, python3Packages, fetchFromGitHub }:
{ lib, python3Packages, fetchFromGitHub
, conf ? ../conf.py
}:
let
packbits = python3Packages.buildPythonPackage rec {
pname = "packbits";
version = "0.6";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "0d7hzxxhyv6x160dnfjrdpyaz0239300cpl3za6aq12fnc5kfsxw";
};
};
brother-ql = python3Packages.buildPythonPackage rec {
pname = "brother-ql";
version = "0.9.4";
src = python3Packages.fetchPypi {
pname = "brother_ql";
inherit version;
sha256 = "0q469rhkrjyhhplvs7j2hdsbnvpp0404fzrr0k1cj4ph76h5fp0z";
};
propagatedBuildInputs = with python3Packages; [
click
future
packbits
pillow
pyusb
attrs
];
};
python-barcode = python3Packages.buildPythonPackage rec {
pname = "python-barcode";
version = "0.13.1";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "0lmj4cp9g38hyb15yfyndarw5xhqzyac48g5gdvnkng94jma9yzs";
};
propagatedBuildInputs = with python3Packages; [ pillow setuptools_scm ];
doCheck = false;
#checkInputs = with python3Packages; [ tox ];
};
in
python3Packages.buildPythonApplication {
pname = "dibbler";
version = "unstable-2021-09-07";
@@ -70,8 +27,10 @@ python3Packages.buildPythonApplication {
libdir=$out/lib/${python3Packages.python.libPrefix}/site-packages
mv * $libdir
cp ${conf} $libdir/
mv $libdir/text_based.py $out/bin/text_based.py
mv $libdir/text_based.py $out/bin/dibbler
runHook postInstall
'';