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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,140 @@
{ lib
, multiStdenv
, fetchFromGitHub
, substituteAll
, pkgsi686Linux
, libnotify
, meson
, ninja
, pkg-config
, wine
, boost
, libxcb
, nix-update-script
}:
let
# Derived from subprojects/bitsery.wrap
bitsery = fetchFromGitHub {
owner = "fraillt";
repo = "bitsery";
rev = "c0fc083c9de805e5825d7553507569febf6a6f93";
sha256 = "sha256-VwzVtxt+E/SVcxqIJw8BKPO2q7bu/hkhY+nB7FHrZpY=";
};
# Derived from subprojects/function2.wrap
function2 = fetchFromGitHub {
owner = "Naios";
repo = "function2";
rev = "02ca99831de59c7c3a4b834789260253cace0ced";
sha256 = "sha256-wrt+fCcM6YD4ZRZYvqqB+fNakCNmltdPZKlNkPLtgMs=";
};
# Derived from subprojects/tomlplusplus.wrap
tomlplusplus = fetchFromGitHub {
owner = "marzer";
repo = "tomlplusplus";
rev = "8e669aa6990e0ed219c169d491472d749f54c393";
sha256 = "sha256-l8ckbCqjz3GUfwStcl3H2C+un5dZfT2uLtayvdu93D4=";
};
# Derived from vst3.wrap
vst3 = fetchFromGitHub {
owner = "robbert-vdh";
repo = "vst3sdk";
rev = "v3.7.4_build_25-patched";
fetchSubmodules = true;
sha256 = "sha256-oHRJZItw+he5M+beVZkUrhJir6rgFZ80ORzA73mJT2A=";
};
in multiStdenv.mkDerivation rec {
pname = "yabridge";
version = "3.8.1";
# NOTE: Also update yabridgectl's cargoHash when this is updated
src = fetchFromGitHub {
owner = "robbert-vdh";
repo = pname;
rev = version;
sha256 = "sha256-5Mi/aIjOKbn7guTj+AKGQRv+k7w4gzfdA9Mw4ocUlOE=";
};
# Unpack subproject sources
postUnpack = ''(
cd "$sourceRoot/subprojects"
cp -R --no-preserve=mode,ownership ${bitsery} bitsery
cp packagefiles/bitsery/* bitsery
cp -R --no-preserve=mode,ownership ${function2} function2
cp packagefiles/function2/* function2
cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus
cp -R --no-preserve=mode,ownership ${vst3} vst3
)'';
patches = [
# Hard code bitbridge & runtime dependencies
(substituteAll {
src = ./hardcode-dependencies.patch;
boost32 = pkgsi686Linux.boost;
libxcb32 = pkgsi686Linux.xorg.libxcb;
inherit libnotify wine;
})
];
postPatch = ''
patchShebangs .
'';
nativeBuildInputs = [
meson
ninja
pkg-config
wine
];
buildInputs = [
boost
libxcb
];
# Meson is no longer able to pick up Boost automatically.
# https://github.com/NixOS/nixpkgs/issues/86131
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
mesonFlags = [
"--cross-file" "cross-wine.conf"
"-Dwith-bitbridge=true"
# Requires CMake and is unnecessary
"-Dtomlplusplus:generate_cmake_config=false"
];
installPhase = ''
runHook preInstall
mkdir -p "$out/bin" "$out/lib"
cp yabridge-group*.exe{,.so} "$out/bin"
cp yabridge-host*.exe{,.so} "$out/bin"
cp libyabridge-vst2.so "$out/lib"
cp libyabridge-vst3.so "$out/lib"
runHook postInstall
'';
# Hard code wine path in wrapper scripts generated by winegcc
postFixup = ''
for exe in "$out"/bin/*.exe; do
substituteInPlace "$exe" \
--replace 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine"'
done
'';
passthru.updateScript = nix-update-script {
attrPath = pname;
};
meta = with lib; {
description = "Yet Another VST bridge, run Windows VST2 plugins under Linux";
homepage = "https://github.com/robbert-vdh/yabridge";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kira-bruneau ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,43 @@
diff --git a/meson.build b/meson.build
index c71d4fdb..b3f381ba 100644
--- a/meson.build
+++ b/meson.build
@@ -201,6 +201,7 @@ if with_32bit_libraries or with_bitbridge
'boost_filesystem',
static : with_static_boost,
dirs : [
+ '@boost32@/lib',
# Used by Arch based distros
'/usr/local/lib32',
'/usr/lib32',
@@ -224,7 +225,7 @@ if is_64bit_system
xcb_64bit_dep = dependency('xcb')
endif
if with_32bit_libraries or with_bitbridge
- xcb_32bit_dep = winegcc.find_library('xcb')
+ xcb_32bit_dep = winegcc.find_library('xcb', dirs: ['@libxcb32@/lib'])
endif
# These are all headers-only libraries, and thus won't require separate 32-bit
diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp
index fc2c8b25..c73249e3 100644
--- a/src/plugin/utils.cpp
+++ b/src/plugin/utils.cpp
@@ -107,7 +107,7 @@ std::string PluginInfo::wine_version() const {
access(wineloader_path.c_str(), X_OK) == 0) {
wine_path = wineloader_path;
} else {
- wine_path = bp::search_path("wine").string();
+ wine_path = "@wine@/bin/wine";
}
bp::ipstream output;
@@ -436,7 +436,7 @@ Configuration load_config_for(const fs::path& yabridge_path) {
bool send_notification(const std::string& title,
const std::string body,
bool append_origin) {
- const fs::path notify_send_path = bp::search_path("notify-send");
+ const fs::path notify_send_path = "@libnotify@/bin/notify-send";
if (notify_send_path.empty()) {
return false;
}