about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/imaginer/default.nix
blob: 1b00bd0614bdf318ea7ac9bc8fbc79daa46b0d26 (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
{ stdenv
, lib
, appstream-glib
, blueprint-compiler
, desktop-file-utils
, fetchFromGitHub
, gettext
, glib
, gobject-introspection
, libadwaita
, libsoup_3
, meson
, ninja
, pkg-config
, python3Packages
, wrapGAppsHook4
}:

python3Packages.buildPythonApplication rec {
  pname = "imaginer";
  version = "0.1.3";

  src = fetchFromGitHub {
    owner = "ImaginerApp";
    repo = "Imaginer";
    rev = "v${version}";
    hash = "sha256-x1ZnmfaMfxnITiuFDlMPfTU8KZbd1ME9jDevnlsrbJs=";
  };

  format = "other";
  dontWrapGApps = true;

  nativeBuildInputs = [
    appstream-glib
    blueprint-compiler
    desktop-file-utils
    gettext
    glib
    gobject-introspection
    meson
    ninja
    pkg-config
    wrapGAppsHook4
  ];

  buildInputs = [
    libadwaita
    libsoup_3
  ];

  propagatedBuildInputs = with python3Packages; [
    openai
    pillow
    pygobject3
    requests
  ];

  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  meta = with lib; {
    homepage = "https://github.com/ImaginerApp/Imaginer";
    description = "Imaginer with AI";
    mainProgram = "imaginer";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ _0xMRTT ];
  };
}