uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
129
pkgs/applications/misc/megasync/default.nix
Normal file
129
pkgs/applications/misc/megasync/default.nix
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, autoconf
|
||||
, automake
|
||||
, c-ares
|
||||
, cryptopp
|
||||
, curl
|
||||
, doxygen
|
||||
, fetchFromGitHub
|
||||
, ffmpeg
|
||||
, freeimage
|
||||
, libmediainfo
|
||||
, libraw
|
||||
, libsodium
|
||||
, libtool
|
||||
, libuv
|
||||
, libzen
|
||||
, lsb-release
|
||||
, mkDerivation
|
||||
, pkg-config
|
||||
, qtbase
|
||||
, qttools
|
||||
, qtx11extras
|
||||
, sqlite
|
||||
, swig
|
||||
, unzip
|
||||
, wget
|
||||
}:
|
||||
mkDerivation rec {
|
||||
pname = "megasync";
|
||||
version = "4.6.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "meganz";
|
||||
repo = "MEGAsync";
|
||||
rev = "v${version}_Linux";
|
||||
sha256 = "sha256-2gsJmMnt0+4vknd2HgOtCYCjVWT7eD0WBimmtsFEhvY=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
doxygen
|
||||
libtool
|
||||
lsb-release
|
||||
pkg-config
|
||||
qttools
|
||||
swig
|
||||
unzip
|
||||
];
|
||||
buildInputs = [
|
||||
c-ares
|
||||
cryptopp
|
||||
curl
|
||||
ffmpeg
|
||||
freeimage
|
||||
libmediainfo
|
||||
libraw
|
||||
libsodium
|
||||
libuv
|
||||
libzen
|
||||
qtbase
|
||||
qtx11extras
|
||||
sqlite
|
||||
wget
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Distro and version targets attempt to use lsb_release which is broken
|
||||
# (see issue: https://github.com/NixOS/nixpkgs/issues/22729)
|
||||
./noinstall-distro-version.patch
|
||||
# megasync target is not part of the install rule thanks to a commented block
|
||||
./install-megasync.patch
|
||||
./ffmpeg_44.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
for file in $(find src/ -type f \( -iname configure -o -iname \*.sh \) ); do
|
||||
substituteInPlace "$file" --replace "/bin/bash" "${stdenv.shell}"
|
||||
done
|
||||
'';
|
||||
|
||||
dontUseQmakeConfigure = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
cd src/MEGASync/mega
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--disable-examples"
|
||||
"--disable-java"
|
||||
"--disable-php"
|
||||
"--enable-chat"
|
||||
"--with-cares"
|
||||
"--with-cryptopp"
|
||||
"--with-curl"
|
||||
"--with-ffmpeg"
|
||||
"--with-freeimage"
|
||||
"--without-readline"
|
||||
"--without-termcap"
|
||||
"--with-sodium"
|
||||
"--with-sqlite"
|
||||
"--with-zlib"
|
||||
];
|
||||
|
||||
postConfigure = ''
|
||||
cd ../..
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
qmake CONFIG+="release" MEGA.pro
|
||||
pushd MEGASync
|
||||
lrelease MEGASync.pro
|
||||
DESKTOP_DESTDIR="$out" qmake PREFIX="$out" -o Makefile MEGASync.pro CONFIG+=release
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Easy automated syncing between your computers and your MEGA Cloud Drive";
|
||||
homepage = "https://mega.nz/";
|
||||
license = licenses.unfree;
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
maintainers = [ maintainers.michojel ];
|
||||
};
|
||||
}
|
||||
14
pkgs/applications/misc/megasync/ffmpeg_44.patch
Normal file
14
pkgs/applications/misc/megasync/ffmpeg_44.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Index: megasync-4.6.1.0/src/MEGASync/mega/src/gfx/freeimage.cpp
|
||||
===================================================================
|
||||
--- megasync-4.6.1.0.orig/src/MEGASync/mega/src/gfx/freeimage.cpp
|
||||
+++ megasync-4.6.1.0/src/MEGASync/mega/src/gfx/freeimage.cpp
|
||||
@@ -253,7 +253,8 @@ bool GfxProcFreeImage::readbitmapFfmpeg(
|
||||
|
||||
// Force seeking to key frames
|
||||
formatContext->seek2any = false;
|
||||
- videoStream->skip_to_keyframe = true;
|
||||
+ // no longer exposed in ffmpeg 4.4; the line above should be sufficient
|
||||
+ //videoStream->skip_to_keyframe = true;
|
||||
if (decoder->capabilities & CAP_TRUNCATED)
|
||||
{
|
||||
codecContext->flags |= CAP_TRUNCATED;
|
||||
21
pkgs/applications/misc/megasync/install-megasync.patch
Normal file
21
pkgs/applications/misc/megasync/install-megasync.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Index: source/src/MEGASync/MEGASync.pro
|
||||
===================================================================
|
||||
--- source.orig/src/MEGASync/MEGASync.pro
|
||||
+++ source/src/MEGASync/MEGASync.pro
|
||||
@@ -28,11 +28,11 @@ unix:!macx {
|
||||
TARGET = megasync
|
||||
|
||||
# Uncomment the following if "make install" doesn't copy megasync in /usr/bin directory
|
||||
-# isEmpty(PREFIX) {
|
||||
-# PREFIX = /usr
|
||||
-# }
|
||||
-# target.path = $$PREFIX/bin
|
||||
-# INSTALLS += target
|
||||
+ isEmpty(PREFIX) {
|
||||
+ PREFIX = /usr
|
||||
+ }
|
||||
+ target.path = $$PREFIX/bin
|
||||
+ INSTALLS += target
|
||||
}
|
||||
else {
|
||||
TARGET = MEGAsync
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
Index: source/src/MEGASync/platform/platform.pri
|
||||
===================================================================
|
||||
--- source.orig/src/MEGASync/platform/platform.pri
|
||||
+++ source/src/MEGASync/platform/platform.pri
|
||||
@@ -37,7 +37,7 @@ unix:!macx {
|
||||
system(command -v lsb_release): version.commands = lsb_release -rs > $$version.target
|
||||
version.files = $$version.target
|
||||
|
||||
- INSTALLS += distro version
|
||||
+ # INSTALLS += distro version
|
||||
|
||||
QT += dbus
|
||||
SOURCES += $$PWD/linux/LinuxPlatform.cpp \
|
||||
Loading…
Add table
Add a link
Reference in a new issue