about summary refs log tree commit diff
path: root/pkgs/development/libraries/libopenshot-audio/default.nix
blob: 236b3026068ff61211aad7b990497e77b40e4cb6 (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
{ lib
, stdenv
, fetchFromGitHub
, alsa-lib
, cmake
, doxygen
, libX11
, libXcursor
, libXext
, libXft
, libXinerama
, libXrandr
, pkg-config
, zlib
, Accelerate
, AGL
, Cocoa
, Foundation
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "libopenshot-audio";
  version = "0.3.3";

  src = fetchFromGitHub {
    owner = "OpenShot";
    repo = "libopenshot-audio";
    rev = "v${finalAttrs.version}";
    hash = "sha256-9iHeVMoyzTQae/PVYJqON0qOPo3SJlhrqbcp2u1Y8MA=";
  };

  patches = [
    # https://forum.juce.com/t/juce-and-macos-11-arm/40285/24
    ./0001-undef-fpret-on-aarch64-darwin.patch
  ];

  nativeBuildInputs = [
    cmake
    doxygen
    pkg-config
  ];

  buildInputs = lib.optionals stdenv.isLinux [
    alsa-lib
  ] ++ (if stdenv.isDarwin then [
    Accelerate
    AGL
    Cocoa
    Foundation
    zlib
  ] else [
    libX11
    libXcursor
    libXext
    libXft
    libXinerama
    libXrandr
  ]);

  strictDeps = true;

  doCheck = true;

  meta = {
    homepage = "http://openshot.org/";
    description = "High-quality sound editing library";
    mainProgram = "openshot-audio-demo";
    longDescription = ''
      OpenShot Audio Library (libopenshot-audio) is a program that allows the
      high-quality editing and playback of audio, and is based on the amazing
      JUCE library.
    '';
    license = with lib.licenses; [ gpl3Plus ];
    maintainers = with lib.maintainers; [ AndersonTorres ];
    platforms = lib.platforms.unix;
  };
})