vapoursynth: fix darwin build (#359263)
This commit is contained in:
commit
a5fb96baf0
@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
autoreconfHook,
|
||||
pkg-config,
|
||||
vapoursynth,
|
||||
@ -19,6 +20,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-jd/PCXhbCZGMsoXjekbeqMSRVBJAy4INdpkTbZFjVO0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "build-fixes-for-aarch64-apple-silicon.patch";
|
||||
url = "https://github.com/dubhater/vapoursynth-nnedi3/commit/15c15080ed4406929aa0d2d6a3f83ca3e26bc979.patch";
|
||||
hash = "sha256-8gNj4LixfrGq0MaIYdZuwSK/2iyh1E9s/uuSBJHZwx8=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
|
@ -34,7 +34,7 @@ stdenv.mkDerivation {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D -t $out/lib/vapoursynth vsznedi3${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
install -D -t $out/lib/vapoursynth vsznedi3.so
|
||||
install -D -m644 -t $out/share/nnedi3 nnedi3_weights.bin
|
||||
|
||||
runHook postInstall
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
mkDerivation,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
@ -23,6 +24,11 @@ let
|
||||
hash = "sha256-+/9j9DJDGXbuTvE8ZXIu6wjcof39SyatS36Q6y9hLPg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pro/vsedit/vsedit.pro \
|
||||
--replace-fail "TARGET = vsedit-32bit" "TARGET = vsedit"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ qmake ];
|
||||
buildInputs = [
|
||||
qtbase
|
||||
@ -34,9 +40,20 @@ let
|
||||
|
||||
preConfigure = "cd pro";
|
||||
|
||||
preFixup = ''
|
||||
preFixup =
|
||||
''
|
||||
cd ../build/release*
|
||||
mkdir -p $out/bin
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir -p $out/Applications
|
||||
for bin in vsedit{,-job-server{,-watcher}}; do
|
||||
mv $bin.app $out/Applications
|
||||
makeQtWrapper $out/Applications/$bin.app/Contents/MacOS/$bin $out/bin/$bin
|
||||
wrapQtApp $out/Applications/$bin.app/Contents/MacOS/$bin
|
||||
done
|
||||
''
|
||||
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
for bin in vsedit{,-job-server{,-watcher}}; do
|
||||
mv $bin $out/bin
|
||||
wrapQtApp $out/bin/$bin
|
||||
|
@ -12,9 +12,7 @@
|
||||
zimg,
|
||||
libass,
|
||||
python3,
|
||||
libiconv,
|
||||
testers,
|
||||
ApplicationServices,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -33,8 +31,7 @@ stdenv.mkDerivation rec {
|
||||
autoreconfHook
|
||||
makeWrapper
|
||||
];
|
||||
buildInputs =
|
||||
[
|
||||
buildInputs = [
|
||||
zimg
|
||||
libass
|
||||
(python3.withPackages (
|
||||
@ -43,14 +40,10 @@ stdenv.mkDerivation rec {
|
||||
cython
|
||||
]
|
||||
))
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libiconv
|
||||
ApplicationServices
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
doInstallCheck = true;
|
||||
doInstallCheck = !stdenv.hostPlatform.isDarwin;
|
||||
|
||||
passthru = rec {
|
||||
# If vapoursynth is added to the build inputs of mpv and then
|
||||
@ -80,7 +73,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
# Export weak symbol nixPluginDir to permit override of default plugin path
|
||||
sed -E -i \
|
||||
-e 's/(VS_PATH_PLUGINDIR)/(nixPluginDir ? nixPluginDir : \1)/g' \
|
||||
@ -110,11 +103,10 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.hostPlatform.isDarwin; # see https://github.com/NixOS/nixpkgs/pull/189446 for partial fix
|
||||
description = "Video processing framework with the future in mind";
|
||||
homepage = "http://www.vapoursynth.com/";
|
||||
license = licenses.lgpl21;
|
||||
platforms = platforms.x86_64;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [
|
||||
rnhmjoj
|
||||
sbruder
|
||||
|
@ -51,6 +51,14 @@ let
|
||||
|
||||
ext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
in
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
vapoursynth.overrideAttrs (previousAttrs: {
|
||||
pname = "vapoursynth-with-plugins";
|
||||
configureFlags = (previousAttrs.configureFlags or [ ]) ++ [
|
||||
"--with-plugindir=${pluginsEnv}/lib/vapoursynth"
|
||||
];
|
||||
})
|
||||
else
|
||||
runCommand "${vapoursynth.name}-with-plugins"
|
||||
{
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -9033,10 +9033,6 @@ with pkgs;
|
||||
|
||||
eigen2 = callPackage ../development/libraries/eigen/2.0.nix { };
|
||||
|
||||
vapoursynth = callPackage ../by-name/va/vapoursynth/package.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) ApplicationServices;
|
||||
};
|
||||
|
||||
vapoursynth-editor = libsForQt5.callPackage ../by-name/va/vapoursynth/editor.nix { };
|
||||
|
||||
vmmlib = callPackage ../development/libraries/vmmlib {
|
||||
|
Loading…
Reference in New Issue
Block a user