Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { stdenv, fetchurl, dpkg, makeWrapper, patchelf,
- gtk3, gnome3, gdk_pixbuf, cairo, libjpeg }:
- let
- fullPath = stdenv.lib.makeLibraryPath [
- stdenv.cc.cc
- gnome3.gtk
- gdk_pixbuf
- cairo
- libjpeg
- ];
- in
- stdenv.mkDerivation rec {
- version = "14.0.0";
- name = "lightworks-${version}";
- src =
- if stdenv.system == "x86_64-linux" then
- fetchurl {
- url = "http://downloads.lwks.com/v14/lwks-14.0.0-amd64.deb";
- sha256 = "66eb9f9678d979db76199f1c99a71df0ddc017bb47dfda976b508849ab305033";
- }
- else throw "${name} is not supported on ${stdenv.system}";
- buildInputs = [ dpkg makeWrapper ];
- phases = [ "unpackPhase" "installPhase" ];
- unpackPhase = "dpkg-deb -x ${src} ./";
- installPhase = ''
- mkdir -p $out/bin
- cp usr/bin/lightworks $out/bin
- sed -i "s|/usr/lib/lightworks|$out/lib/lightworks|g" $out/bin/lightworks
- cp -r usr/lib $out
- echo "${fullPath}" > $out/fullpath
- ${patchelf}/bin/patchelf \
- --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
- --set-rpath "${fullPath}:\$ORIGIN" \
- $out/lib/lightworks/ntcardvt
- ${patchelf}/bin/patchelf \
- --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
- --set-rpath "${fullPath}:\$ORIGIN" \
- $out/lib/lightworks/spawn
- cp -r usr/share $out/share
- '';
- dontPatchELF = true;
- meta = {
- description = "Lightworks Video Editor";
- homepage = "https://www.lwks.com/";
- license = stdenv.lib.licenses.unfree;
- };
- }
- ldd result/lib/lightworks/ntcardvt
- linux-vdso.so.1 (0x00007fff64f47000)
- ...
- libm.so.6 => /nix/store/78w6a8zinhp7awdmrh5qbvxyci2pb8b4-glibc-2.25/lib/libm.so.6 (0x00007fee31721000)
- libOSPrivate.so => not found
- libgtk-3.so.0 => not found
- libgdk-3.so.0 => not found
- Content of fullPath which goes in rpath:
- /nix/store/av675477wjr9hipa4mi0h44hpkihmdk2-gcc-5.4.0-lib/lib:/nix/store/m81sajnj84r3ciq4nkh2xvqncv92nm73-gtk+3-3.22.12/lib:/nix/store/7p7xgwgylaq6ck1ifwj1y372kchmjqiy-gdk-pixbuf-2.36.6/lib:/nix/store/axvlnhh23w7iqnqn36xg6igwjllijx6v-cairo-1.14.8/lib:/nix/store/4rvvsdvnl4cwjw7nhs4krr21n48wg355-libjpeg-turbo-1.5.1/lib
- ls /nix/store/m81sajnj84r3ciq4nkh2xvqncv92nm73-gtk+3-3.22.12/lib/libgtk-3.so.0
- /nix/store/m81sajnj84r3ciq4nkh2xvqncv92nm73-gtk+3-3.22.12/lib/libgtk-3.so.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement