superfile: 1.1.6 -> 1.1.7 (#371308)
[NixPkgs.git] / pkgs / by-name / ne / neothesia / package.nix
blob4d2ab395bf044cc6da71e6d705f8c39d25197d1b
2   rustPlatform,
3   fetchFromGitHub,
4   lib,
5   ffmpeg,
6   pkg-config,
7   alsa-lib,
8   wayland,
9   makeWrapper,
10   libxkbcommon,
11   vulkan-loader,
12   xorg,
14 let
15   version = "0.2.1";
17   src = fetchFromGitHub {
18     owner = "PolyMeilex";
19     repo = "Neothesia";
20     rev = "v${version}";
21     hash = "sha256-bQ2546q+oachvuNKMJHjQzF6uv06LG+f7eFQPoAn6mw=";
22   };
24 rustPlatform.buildRustPackage {
25   pname = "neothesia";
27   inherit src version;
29   buildInputs = [
30     ffmpeg
31     alsa-lib
32   ];
34   nativeBuildInputs = [
35     pkg-config
36     makeWrapper
37     rustPlatform.bindgenHook
38   ];
40   cargoLock = {
41     lockFile = ./Cargo.lock;
42     outputHashes = {
43       "mpeg_encoder-0.2.1" = "sha256-+BNZZ1FIr1374n8Zs1mww2w3eWHOH6ENOTYXz9RT2Ck=";
44     };
45   };
47   cargoBuildFlags = [
48     "-p neothesia -p neothesia-cli"
49   ];
51   postInstall = ''
52     wrapProgram $out/bin/neothesia --prefix LD_LIBRARY_PATH : "${
53       lib.makeLibraryPath [
54         wayland
55         libxkbcommon
56         vulkan-loader
57         xorg.libX11
58         xorg.libXcursor
59         xorg.libXi
60         xorg.libXrender
61       ]
62     }"
63     install -Dm 644 flatpak/com.github.polymeilex.neothesia.desktop $out/share/applications/com.github.polymeilex.neothesia.desktop
64     install -Dm 644 flatpak/com.github.polymeilex.neothesia.png $out/share/icons/hicolor/256x256/apps/com.github.polymeilex.neothesia.png
65   '';
67   meta = {
68     description = "Flashy Synthesia Like Software For Linux, Windows and macOS";
69     homepage = "https://github.com/PolyMeilex/Neothesia";
70     license = lib.licenses.gpl3;
71     platforms = lib.platforms.linux;
72     mainProgram = "neothesia";
73     maintainers = [
74       lib.maintainers.naxdy
75     ];
76   };