2024-07-31 10:19:44 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
dpkg,
|
|
|
|
makeWrapper,
|
|
|
|
buildFHSEnv,
|
|
|
|
gtk3,
|
|
|
|
gdk-pixbuf,
|
|
|
|
cairo,
|
|
|
|
libjpeg_original,
|
|
|
|
glib,
|
|
|
|
pango,
|
|
|
|
libGLU,
|
|
|
|
libGL,
|
|
|
|
nvidia_cg_toolkit,
|
|
|
|
zlib,
|
|
|
|
openssl,
|
|
|
|
libuuid,
|
|
|
|
alsa-lib,
|
|
|
|
udev,
|
|
|
|
libjack2,
|
|
|
|
freetype,
|
|
|
|
libva,
|
|
|
|
libvdpau,
|
|
|
|
twolame,
|
|
|
|
gmp,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
let
|
2021-01-15 22:18:51 +00:00
|
|
|
fullPath = lib.makeLibraryPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.cc.cc
|
|
|
|
gtk3
|
|
|
|
gdk-pixbuf
|
|
|
|
cairo
|
|
|
|
libjpeg_original
|
|
|
|
glib
|
2020-10-27 00:29:36 +00:00
|
|
|
pango
|
2021-06-06 07:54:09 +00:00
|
|
|
libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
libGLU
|
|
|
|
nvidia_cg_toolkit
|
|
|
|
zlib
|
|
|
|
openssl
|
2021-06-06 07:54:09 +00:00
|
|
|
libuuid
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2021-06-06 07:54:09 +00:00
|
|
|
libjack2
|
|
|
|
udev
|
2023-10-09 19:29:22 +00:00
|
|
|
freetype
|
|
|
|
libva
|
|
|
|
libvdpau
|
2024-07-31 10:19:44 +00:00
|
|
|
twolame
|
|
|
|
gmp
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
lightworks = stdenv.mkDerivation rec {
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2023.2";
|
2024-07-31 10:19:44 +00:00
|
|
|
rev = "146752";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "lightworks";
|
|
|
|
|
|
|
|
src =
|
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
2022-04-27 09:35:20 +00:00
|
|
|
url = "https://cdn.lwks.com/releases/${version}/lightworks_${version}_r${rev}.deb";
|
2024-07-31 10:19:44 +00:00
|
|
|
sha256 = "sha256-Xjcqdhe85YdPX8AHpKmo/K77AURg0JvtqIvilQOV2ek=";
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|
2024-07-31 10:19:44 +00:00
|
|
|
else
|
|
|
|
throw "${pname}-${version} is not supported on ${stdenv.hostPlatform.system}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ dpkg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x ${src} ./";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
substitute usr/bin/lightworks $out/bin/lightworks \
|
|
|
|
--replace "/usr/lib/lightworks" "$out/lib/lightworks"
|
|
|
|
chmod +x $out/bin/lightworks
|
|
|
|
|
|
|
|
cp -r usr/lib $out
|
|
|
|
|
|
|
|
# /usr/share/fonts is not normally searched
|
|
|
|
# This adds it to lightworks' search path while keeping the default
|
|
|
|
# using the FONTCONFIG_FILE env variable
|
|
|
|
echo "<?xml version='1.0'?>
|
2020-09-25 04:45:31 +00:00
|
|
|
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
|
2020-04-24 23:36:52 +00:00
|
|
|
<fontconfig>
|
|
|
|
<dir>/usr/share/fonts/truetype</dir>
|
|
|
|
<include>/etc/fonts/fonts.conf</include>
|
|
|
|
</fontconfig>" > $out/lib/lightworks/fonts.conf
|
|
|
|
|
|
|
|
patchelf \
|
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
$out/lib/lightworks/ntcardvt
|
|
|
|
|
|
|
|
wrapProgram $out/lib/lightworks/ntcardvt \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${fullPath}:$out/lib/lightworks \
|
|
|
|
--set FONTCONFIG_FILE $out/lib/lightworks/fonts.conf
|
|
|
|
|
|
|
|
cp -r usr/share $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
# Lightworks expects some files in /usr/share/lightworks
|
2024-07-31 10:19:44 +00:00
|
|
|
buildFHSEnv {
|
|
|
|
inherit (lightworks) pname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
targetPkgs = pkgs: [ lightworks ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runScript = "lightworks";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Professional Non-Linear Video Editor";
|
|
|
|
homepage = "https://www.lwks.com/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.unfree;
|
2024-07-31 10:19:44 +00:00
|
|
|
mainProgram = "lightworks";
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
antonxy
|
|
|
|
vojta001
|
|
|
|
kashw2
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|