about summary refs log tree commit diff
path: root/pkgs/applications/misc/inochi2d/default.nix
blob: 9b1c4f67fc7f93d4b3a36d93de2845780b4c160b (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
{
  lib,
  stdenv,
  fetchFromGitHub,
  substituteAll,
  callPackage,
}:

# Note for maintainers:
#
# These packages are only allowed to be packaged under the the condition that we
# - patch source/creator/config.d to not point to upstream's bug tracker
# - use the "barebones" configuration to remove the mascot and logo from the build
#
# We have received permission by the owner to go ahead with the packaging, as we have met all the criteria
# https://github.com/NixOS/nixpkgs/pull/288841#issuecomment-1950247467

let
  mkGeneric = builderArgs: callPackage ./generic.nix { inherit builderArgs; };
in
{
  inochi-creator = mkGeneric rec {
    pname = "inochi-creator";
    appname = "Inochi Creator";
    version = "0.8.4";

    src = fetchFromGitHub {
      owner = "Inochi2D";
      repo = "inochi-creator";
      rev = "v${version}";
      hash = "sha256-wsB9KIZyot2Y+6QpQlIXRzv3cPCdwp2Q/ZfDizAKJc4=";
    };

    dubLock = ./creator-dub-lock.json;

    patches = [
      # Upstream asks that we change the bug tracker URL to not point to the upsteam bug tracker
      (substituteAll {
        src = ./support-url.patch;
        assignees = "TomaSajt"; # should be a comma separated list of the github usernames of the maintainers
      })
      # Change how duplicate locales differentiate themselves (the store paths were too long)
      ./translations.patch
    ];

    meta = {
      # darwin has slightly different build steps
      broken = stdenv.isDarwin;
      changelog = "https://github.com/Inochi2D/inochi-creator/releases/tag/${src.rev}";
      description = "An open source editor for the Inochi2D puppet format";
    };
  };

  inochi-session = mkGeneric rec {
    pname = "inochi-session";
    appname = "Inochi Session";
    version = "0.8.3";

    src = fetchFromGitHub {
      owner = "Inochi2D";
      repo = "inochi-session";
      rev = "v${version}";
      hash = "sha256-yq/uMWEeydZun07/7hgUaAw3IruRqrDuGgbe5NzNYxw=";
    };

    dubLock = ./session-dub-lock.json;

    preFixup = ''
      patchelf $out/share/inochi-session/inochi-session --add-needed cimgui.so
    '';

    dontStrip = true; # symbol lookup error: undefined symbol: , version

    meta = {
      # darwin has slightly different build steps, aarch fails to build because of some lua related error
      broken = stdenv.isDarwin || stdenv.isAarch64;
      changelog = "https://github.com/Inochi2D/inochi-session/releases/tag/${src.rev}";
      description = "An application that allows streaming with Inochi2D puppets";
    };
  };
}