@@ -0,0 +1,29 @@
1+{stdenv, fetchFromGitHub, cups}:
2+
3+stdenv.mkDerivation rec {
4+ pname = "cups-zj-58";
5+ version = "2018-02-22";
6+ name = "${pname}-${version}";
7+
8+ src = fetchFromGitHub {
9+ owner = "klirichek";
10+ repo = "zj-58";
11+ rev = "e4212cd";
12+ sha256 = "1w2qkspm4qqg5h8n6gmakzhiww7gag64chvy9kf89xsl3wsyp6pi";
13+ };
14+
15+ buildInputs = [ cups ];
16+
17+ installPhase = ''
18+ install -D rastertozj $out/lib/cups/filter/rastertozj
19+ install -D ZJ-58.ppd $out/share/cups/model/zjiang/ZJ-58.ppd
20+ '';
21+
22+ meta = with stdenv.lib; {
23+ description = "CUPS filter for thermal printer Zjiang ZJ-58";
24+ homepage = https://github.com/klirichek/zj-58;
25+ platforms = platforms.linux;
26+ maintainers = with maintainers; [ makefu ];
27+ license = licenses.bsd2;
28+ };
29+}