hi! I’m trying to make a derivation for brother_ql, a python package that, inter alia, depends on another python package, packbits.
Both brother_ql and packbits are not in nixpkgs.
The build of brother_ql fails with:
ERROR: Could not find a version that satisfies the requirement packbits (from brother-ql)
ERROR: No matching distribution found for packbits
I’ve successfully made a derivation for packbits and added it to my environment with nix-env, but I don’t know how to refer to it from the derivation for brother_ql.
How do I say, if you will, something like
buildInputs = [ ../packbits/default.nix ]; #this does not work
(The above pseudocode obviously does not work, but I hope you kinda get what I’m going for.)
Here’s what I’ve got so far for brother_ql/default.nix:
{ pkgs ? import <nixpkgs> {}, pyV ? "38" }:
let
commit = "73de0e330fd611769c192e98c11afc2d846d822b"; # from: Mon Apr 27 2020
fetchPypi = import (builtins.fetchTarball {
name = "nix-pypi-fetcher";
url = "https://github.com/DavHau/nix-pypi-fetcher/tarball/${commit}";
# Hash obtained using `nix-prefetch-url --unpack <url>`
sha256 = "1c06574aznhkzvricgy5xbkyfs33kpln7fb41h8ijhib60nharnp";
});
in
pkgs."python${pyV}".pkgs.buildPythonPackage rec {
pname = "brother_ql";
version = "0.9.4";
src = fetchPypi "brother_ql" "0.9.4";
# No tests included
doCheck = false;
# TODO fixme
propagatedBuildInputs = with pkgs."python${pyV}Packages"; [
pyusb
];
meta = with pkgs.lib; {
description = "Python Brother QL-800 access module (wraps pyusb)";
homepage = "https://github.com/pklaus/brother_ql/";
license = licenses.gpl3;
#maintainers = with maintainers; [ elmarsto ];
};
}