about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-livesplit-one/default.nix
blob: 1f4665bf9ef077a112020512885e847edb4778b0 (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
{ lib
, fetchFromGitHub
, rustPlatform
, cmake
, fontconfig
, obs-studio
, pkg-config
}:

rustPlatform.buildRustPackage rec {
  pname = "obs-livesplit-one";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "CryZe";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-C1u4z7iQUETM84kf6S6obw+C0ox8J9gMJoVP3/3ZoYw=";
  };

  cargoHash = "sha256-mQ0TR4DL4bA5u4IL3RY9aLxU5G6qQ5W5xuNadiXGeB0=";

  nativeBuildInputs = [ cmake pkg-config ];
  buildInputs = [ fontconfig obs-studio ];

  postInstall = ''
    mkdir $out/lib/obs-plugins/
    mv $out/lib/libobs_livesplit_one.so $out/lib/obs-plugins/obs-livesplit-one.so
  '';

  meta = with lib; {
    description = "OBS Studio plugin for adding LiveSplit One as a source";
    homepage = "https://github.com/CryZe/obs-livesplit-one";
    license = with licenses; [ asl20 mit ];
    maintainers = [ maintainers.Bauke ];
    platforms = obs-studio.meta.platforms;
  };
}