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,13 @@
diff --git a/Cargo.lock b/Cargo.lock
index 963e40e..fb76d78 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -230,7 +230,7 @@ dependencies = [
[[package]]
name = "fishnet"
-version = "2.5.1-dev"
+version = "2.5.1"
dependencies = [
"arrayvec",
"atty",

View file

@ -0,0 +1,47 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, fetchurl
}:
let
nnueFile = "nn-13406b1dcbe0.nnue";
nnue = fetchurl {
url = "https://tests.stockfishchess.org/api/nn/${nnueFile}";
sha256 = "sha256-E0BrHcvgo238XgfaUdjbOLekXX2kMHjsJadiTCuDI28=";
};
in
rustPlatform.buildRustPackage rec {
pname = "fishnet";
version = "2.5.1";
src = fetchFromGitHub {
owner = "niklasf";
repo = pname;
rev = "v${version}";
sha256 = "sha256-nVRG60sSpTqfqhCclvWoeyHR0+oO1Jn1PgftigDGq5c=";
fetchSubmodules = true;
};
postPatch = ''
cp -v '${nnue}' 'Stockfish/src/${nnueFile}'
cp -v '${nnue}' 'Fairy-Stockfish/src/${nnueFile}'
'';
cargoSha256 = "sha256-BJK7M/pjHRj74xoeciavhkK2YRpeogkELIuXetX73so=";
# TODO: Cargo.lock is out of date, so fix it. Likely not necessary anymore in
# the next update.
cargoPatches = [
./Cargo.lock.patch
];
meta = with lib; {
description = "Distributed Stockfish analysis for lichess.org";
homepage = "https://github.com/niklasf/fishnet";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ tu-maurice ];
platforms = [ "x86_64-linux" ];
};
}