nixpkgs/pkgs/applications/video/shotcut/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

92 lines
2.1 KiB
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
2023-11-23 14:14:13 +00:00
, stdenv
, wrapQtAppsHook
, substituteAll
, SDL2
, frei0r
, ladspaPlugins
, gettext
, mlt
, jack1
, pkg-config
2023-11-23 14:14:13 +00:00
, fftw
, qtbase
, qttools
2023-11-23 14:14:13 +00:00
, qtmultimedia
, qtcharts
, cmake
, Cocoa
, gitUpdater
}:
stdenv.mkDerivation (finalAttrs: {
pname = "shotcut";
version = "24.02.29";
src = fetchFromGitHub {
owner = "mltframework";
repo = "shotcut";
rev = "v${finalAttrs.version}";
hash = "sha256-PHpVquqC0MT7WNoWcdB9WTz4ZiSK4/f4oD5PH1gWBnw=";
};
2023-11-23 14:14:13 +00:00
nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ];
2017-06-02 15:40:19 +00:00
buildInputs = [
SDL2
frei0r
ladspaPlugins
gettext
mlt
2023-11-23 14:14:13 +00:00
fftw
qtbase
2023-11-23 14:14:13 +00:00
qttools
qtmultimedia
2023-11-23 14:14:13 +00:00
qtcharts
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Cocoa
2017-06-02 15:40:19 +00:00
];
2023-11-23 14:14:13 +00:00
env.NIX_CFLAGS_COMPILE = "-DSHOTCUT_NOUPGRADE";
cmakeFlags = [
"-DSHOTCUT_VERSION=${finalAttrs.version}"
];
2023-11-23 14:14:13 +00:00
patches = [
(substituteAll { inherit mlt; src = ./fix-mlt-ffmpeg-path.patch; })
];
2019-08-02 11:26:16 +00:00
qtWrapperArgs = [
2023-11-23 14:14:13 +00:00
"--set FREI0R_PATH ${frei0r}/lib/frei0r-1"
"--set LADSPA_PATH ${ladspaPlugins}/lib/ladspa"
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([SDL2] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [jack1])}"
];
2019-08-02 11:26:16 +00:00
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications $out/bin
mv $out/Shotcut.app $out/Applications/Shotcut.app
ln -s $out/Applications/Shotcut.app/Contents/MacOS/Shotcut $out/bin/shotcut
'';
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = with lib; {
description = "A free, open source, cross-platform video editor";
longDescription = ''
An official binary for Shotcut, which includes all the
dependencies pinned to specific versions, is provided on
http://shotcut.org.
If you encounter problems with this version, please contact the
nixpkgs maintainer(s). If you wish to report any bugs upstream,
please use the official build from shotcut.org instead.
'';
2020-04-07 17:48:38 +00:00
homepage = "https://shotcut.org";
2021-09-15 14:59:19 +00:00
license = licenses.gpl3Plus;
maintainers = with maintainers; [ goibhniu woffs peti ];
platforms = platforms.unix;
2023-11-27 01:17:53 +00:00
mainProgram = "shotcut";
};
})