2021-01-15 05:42:41 +00:00
|
|
|
{ lib, stdenv, fetchurl, dpkg, makeWrapper, buildFHSUserEnv
|
2020-10-25 19:38:25 +00:00
|
|
|
, gtk3, gdk-pixbuf, cairo, libjpeg_original, glib, pango, libGLU
|
2021-06-10 03:57:09 +01:00
|
|
|
, libGL, nvidia_cg_toolkit, zlib, openssl, libuuid , alsa-lib, udev, libjack2
|
2017-05-06 13:55:13 +01:00
|
|
|
}:
|
|
|
|
let
|
2021-01-15 05:42:41 +00:00
|
|
|
fullPath = lib.makeLibraryPath [
|
2017-05-06 13:55:13 +01:00
|
|
|
stdenv.cc.cc
|
2019-03-09 11:41:12 +00:00
|
|
|
gtk3
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2017-05-06 13:55:13 +01:00
|
|
|
cairo
|
|
|
|
libjpeg_original
|
|
|
|
glib
|
2020-10-25 19:38:25 +00:00
|
|
|
pango
|
2021-05-04 08:14:37 +01:00
|
|
|
libGL
|
2018-02-24 12:59:47 +00:00
|
|
|
libGLU
|
2017-05-06 13:55:13 +01:00
|
|
|
nvidia_cg_toolkit
|
|
|
|
zlib
|
|
|
|
openssl
|
2021-05-04 08:14:37 +01:00
|
|
|
libuuid
|
2021-06-10 03:57:09 +01:00
|
|
|
alsa-lib
|
2021-06-05 09:32:59 +01:00
|
|
|
libjack2
|
2021-05-04 08:14:37 +01:00
|
|
|
udev
|
2017-05-06 13:55:13 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
lightworks = stdenv.mkDerivation rec {
|
2022-03-10 15:13:58 +00:00
|
|
|
version = "2022.1.1";
|
|
|
|
rev = "132926";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "lightworks";
|
2019-03-09 11:41:12 +00:00
|
|
|
|
2017-05-06 13:55:13 +01:00
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2017-05-06 13:55:13 +01:00
|
|
|
fetchurl {
|
2022-03-10 15:13:58 +00:00
|
|
|
url = "https://cdn.lwks.com/releases/${version}/lightworks_${version}_r${rev}.deb";
|
|
|
|
sha256 = "sha256-f2lxfv0sFESpDnINDKlfVcR0pySAueMeOMbkgBWzz7Q=";
|
2017-05-06 13:55:13 +01:00
|
|
|
}
|
2019-08-15 13:41:18 +01:00
|
|
|
else throw "${pname}-${version} is not supported on ${stdenv.hostPlatform.system}";
|
2017-05-06 13:55:13 +01:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ dpkg ];
|
2017-05-06 13:55:13 +01: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-03 05:38:22 +01:00
|
|
|
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
|
2017-05-06 13:55:13 +01: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
|
2019-05-22 12:03:39 +01:00
|
|
|
|
2017-05-06 13:55:13 +01:00
|
|
|
cp -r usr/share $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Lightworks expects some files in /usr/share/lightworks
|
2019-08-13 22:52:01 +01:00
|
|
|
in buildFHSUserEnv {
|
2018-05-28 13:59:57 +01:00
|
|
|
name = lightworks.name;
|
2017-05-06 13:55:13 +01:00
|
|
|
|
|
|
|
targetPkgs = pkgs: [
|
|
|
|
lightworks
|
|
|
|
];
|
|
|
|
|
|
|
|
runScript = "lightworks";
|
2020-04-12 16:29:30 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Professional Non-Linear Video Editor";
|
|
|
|
homepage = "https://www.lwks.com/";
|
2022-06-04 23:19:25 +01:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2021-01-15 05:42:41 +00:00
|
|
|
license = lib.licenses.unfree;
|
2021-05-04 08:14:45 +01:00
|
|
|
maintainers = with lib.maintainers; [ antonxy vojta001 ];
|
2020-04-12 16:29:30 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
2017-05-06 13:55:13 +01:00
|
|
|
}
|