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,18 @@
diff --git a/cmake/CorrosionConfig.cmake.in b/cmake/CorrosionConfig.cmake.in
index c042a00..491f53c 100644
--- a/cmake/CorrosionConfig.cmake.in
+++ b/cmake/CorrosionConfig.cmake.in
@@ -4,11 +4,11 @@ if (Corrosion_FOUND)
return()
endif()
-list(APPEND CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_DATADIR@/cmake")
+list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_FULL_DATADIR@/cmake")
add_executable(Corrosion::Generator IMPORTED GLOBAL)
set_property(
TARGET Corrosion::Generator
- PROPERTY IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_LIBEXECDIR@/corrosion-generator")
+ PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_FULL_LIBEXECDIR@/corrosion-generator")
include(Corrosion)

View file

@ -0,0 +1,53 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, rustPlatform
, libiconv
}:
stdenv.mkDerivation rec {
pname = "corrosion";
version = "0.2.1";
src = fetchFromGitHub {
owner = "corrosion-rs";
repo = "corrosion";
rev = "v${version}";
hash = "sha256-nJ4ercNykECDBqecuL8cdCl4DHgbgIUmbiFBG/jiOaA=";
};
cargoRoot = "generator";
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
sourceRoot = "${src.name}/${cargoRoot}";
name = "${pname}-${version}";
hash = "sha256-4JVbHYlMOKztWPYW7tXQdvdNh/ygfpi0CY6Ly93VxsI=";
};
buildInputs = lib.optional stdenv.isDarwin libiconv;
nativeBuildInputs = [
cmake
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
cmakeFlags = [
"-DRust_CARGO=${rustPlatform.rust.cargo}/bin/cargo"
# tests cannot find cargo because Rust_CARGO is unset before tests
"-DCORROSION_BUILD_TESTS=OFF"
];
meta = with lib; {
description = "Tool for integrating Rust into an existing CMake project";
homepage = "https://github.com/corrosion-rs/corrosion";
changelog = "https://github.com/corrosion-rs/corrosion/blob/${src.rev}/RELEASES.md";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}