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
71
pkgs/development/python-modules/blspy/default.nix
Normal file
71
pkgs/development/python-modules/blspy/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, setuptools-scm
|
||||
, substituteAll
|
||||
, cmake
|
||||
, boost
|
||||
, gmp
|
||||
, pybind11
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "blspy";
|
||||
version = "1.0.9";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-6keimQqwh37G9xc1Xyxlr+0n9Qgv87Np2D7Gzj6ik5Y=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# prevent CMake from trying to get libraries on the Internet
|
||||
(substituteAll {
|
||||
src = ./dont_fetch_dependencies.patch;
|
||||
pybind11_src = pybind11.src;
|
||||
relic_src = fetchFromGitHub {
|
||||
owner = "Chia-Network";
|
||||
repo = "relic";
|
||||
rev = "1d98e5abf3ca5b14fd729bd5bcced88ea70ecfd7"; # pinned by blspy
|
||||
hash = "sha256-IfTD8DvTEXeLUoKe4Ejafb+PEJW5DV/VXRYuutwGQHU=";
|
||||
};
|
||||
sodium_src = fetchFromGitHub {
|
||||
owner = "AmineKhaldi";
|
||||
repo = "libsodium-cmake";
|
||||
rev = "f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65"; # pinned by blspy
|
||||
sha256 = "sha256-lGz7o6DQVAuEc7yTp8bYS2kwjzHwGaNjugDi1ruRJOA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
catch2_src = fetchFromGitHub {
|
||||
owner = "catchorg";
|
||||
repo = "Catch2";
|
||||
rev = "v2.13.7"; # pinned by blspy
|
||||
sha256 = "NhZ8Hh7dka7KggEKKZyEbIZahuuTYeCT7cYYSUvkPzI=";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake setuptools-scm ];
|
||||
|
||||
buildInputs = [ boost gmp.static pybind11 ];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"blspy"
|
||||
];
|
||||
|
||||
# Note: upstream testsuite is just a single test.py script outside of any framework
|
||||
doCheck = false;
|
||||
|
||||
# CMake needs to be run by setuptools rather than by its hook
|
||||
dontConfigure = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "BLS signatures with aggregation";
|
||||
homepage = "https://github.com/Chia-Network/bls-signatures/";
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.chia.members;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6922167..23d8da6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -31,29 +31,18 @@ set(CMAKE_MODULE_PATH
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(Sodium
|
||||
- GIT_REPOSITORY https://github.com/AmineKhaldi/libsodium-cmake.git
|
||||
- # Latest commit at the moment this was added here
|
||||
- # Anchored to libsodium v1.0.18
|
||||
- GIT_TAG f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65
|
||||
+ URL @sodium_src@
|
||||
)
|
||||
set(SODIUM_PCH "on" CACHE STRING "")
|
||||
set(SODIUM_DISABLE_TESTS "on" CACHE STRING "")
|
||||
set(SODIUM_CHIA_MINIMAL "on" CACHE STRING "")
|
||||
FetchContent_MakeAvailable(Sodium)
|
||||
|
||||
-if (DEFINED ENV{RELIC_MAIN})
|
||||
- set(RELIC_GIT_TAG "origin/main")
|
||||
-else ()
|
||||
- # This is currently anchored to upstream aecdcae7956f542fbee2392c1f0feb0a8ac41dc5
|
||||
- set(RELIC_GIT_TAG "1d98e5abf3ca5b14fd729bd5bcced88ea70ecfd7")
|
||||
-endif ()
|
||||
-
|
||||
message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}")
|
||||
|
||||
FetchContent_Declare(
|
||||
relic
|
||||
- GIT_REPOSITORY https://github.com/Chia-Network/relic.git
|
||||
- GIT_TAG ${RELIC_GIT_TAG}
|
||||
+ SOURCE_DIR @relic_src@
|
||||
)
|
||||
|
||||
# Relic related options
|
||||
diff --git a/python-bindings/CMakeLists.txt b/python-bindings/CMakeLists.txt
|
||||
index 5a8c381..d9aa940 100644
|
||||
--- a/python-bindings/CMakeLists.txt
|
||||
+++ b/python-bindings/CMakeLists.txt
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
FetchContent_Declare(
|
||||
pybind11
|
||||
- GIT_REPOSITORY https://github.com/pybind/pybind11.git
|
||||
- GIT_TAG v2.6.2
|
||||
+ SOURCE_DIR @pybind11_src@
|
||||
)
|
||||
FetchContent_MakeAvailable(pybind11 relic)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 449164a..15a955e 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -37,8 +37,7 @@ install(FILES $<TARGET_FILE:bls> DESTINATION lib)
|
||||
if(BUILD_BLS_TESTS)
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
- GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
- GIT_TAG v2.13.7
|
||||
+ URL @catch2_src@
|
||||
)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
add_executable(runtest test.cpp)
|
||||
Loading…
Add table
Add a link
Reference in a new issue