summary refs log tree commit diff
path: root/pkgs/applications/misc/octoprint/plugins.nix
blob: 801be43220d9a6e0d5898fd187a139725b94fbdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{ stdenv, fetchFromGitHub, octoprint, pythonPackages }:

let
  buildPlugin = args: pythonPackages.buildPythonPackage (args // {
    buildInputs = (args.buildInputs or []) ++ [ octoprint ];
  });
in {

  m3d-fio = buildPlugin rec {
    name = "M3D-Fio-${version}";
    version = "0.26";

    src = fetchFromGitHub {
      owner = "donovan6000";
      repo = "M3D-Fio";
      rev = "V${version}";
      sha256 = "1dl8m0cxp2vzla2a729r3jrq5ahxkj10pygp7m9bblj5nn2s0rll";
    };

    patches = [
      ./0001-Don-t-use-static-library.patch
      ./0002-Try-to-create-connection-several-times-if-printer-is.patch
    ];

    postInstall = ''
    (
      cd 'shared library source'
      make
      install -Dm755 libpreprocessor.so $out/lib/libpreprocessor.so
    )
    rm -rf $out/${pythonPackages.python.sitePackages}/octoprint_m3dfio/static/libraries
    '';

    meta = with stdenv.lib; {
      homepage = https://github.com/donovan6000/M3D-Fio;
      description = " OctoPrint plugin for the Micro 3D printer";
      platforms = platforms.all;
      license = licenses.gpl3;
      maintainers = with maintainers; [ abbradar ];
    };
  };

  titlestatus = buildPlugin rec {
    name = "OctoPrint-TitleStatus-${version}";
    version = "0.0.2";

    src = fetchFromGitHub {
      owner = "MoonshineSG";
      repo = "OctoPrint-TitleStatus";
      rev = version;
      sha256 = "0rfbpxbcmadyihcrynh6bjywy3yqnzsnjn3yiwifisbrjgpm6sfw";
    };

    meta = with stdenv.lib; {
      homepage = https://github.com/MoonshineSG/OctoPrint-TitleStatus;
      description = "Show printers status in window title";
      platforms = platforms.all;
      license = licenses.agpl3;
      maintainers = with maintainers; [ abbradar ];
    };
  };

  stlviewer = buildPlugin rec {
    name = "OctoPrint-STLViewer-${version}";
    version = "0.3.0";

    src = fetchFromGitHub {
      owner = "jneilliii";
      repo = "OctoPrint-STLViewer";
      rev = "v${version}";
      sha256 = "1a6sa8pw9ay7x27pfwr3nzb22x3jaw0c9vwyz4mrj76zkiw6svfi";
    };

    meta = with stdenv.lib; {
      homepage = https://github.com/jneilliii/Octoprint-STLViewer;
      description = "A simple stl viewer tab for OctoPrint";
      platforms = platforms.all;
      license = licenses.agpl3;
      maintainers = with maintainers; [ abbradar ];
    };
  };

}