commit
bd83e4cf98
@ -1,42 +1,60 @@ |
||||
{ rustPlatform, lib, fetchFromGitHub |
||||
, zlib, elfutils, openssl |
||||
, cmake, python3, pkg-config, protobuf, perl, llvmPackages |
||||
, zlib, openssl |
||||
, pkg-config, protobuf, llvmPackages |
||||
}: |
||||
rustPlatform.buildRustPackage rec { |
||||
#https://github.com/near/nearcore |
||||
pname = "nearcore"; |
||||
version = "1.25.0"; |
||||
version = "1.26.0"; |
||||
|
||||
# https://github.com/near/nearcore/tags |
||||
src = fetchFromGitHub { |
||||
owner = "near"; |
||||
repo = "nearcore"; |
||||
# there is also a branch for this version number, so we need to be explicit |
||||
rev = "refs/tags/${version}"; |
||||
sha256 = "sha256-7hiBqJLGIf+kNKJvMQ7KtGZm/SWLY3pT7YDlwbm3HDM="; |
||||
sha256 = "sha256-N3A+hy5I1/yJ3IN9gDw3m1IZ9qK8LNhn3fuXLMn23bg="; |
||||
}; |
||||
|
||||
cargoSha256 = "sha256-EGv4CibSHL9oTAdWK7d/SOzZWPcEB16hTWlWHjKU4wc="; |
||||
cargoSha256 = "sha256-g07liit048TSL73wFyDK+eKu33Z6fPJcJ+VeGgTtuS8="; |
||||
|
||||
postPatch = '' |
||||
substituteInPlace neard/build.rs \ |
||||
--replace 'get_git_version()?' '"nix:${version}"' |
||||
''; |
||||
|
||||
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1"; |
||||
CARGO_PROFILE_RELEASE_LTO = "fat"; |
||||
NEAR_RELEASE_BUILD = "release"; |
||||
|
||||
OPENSSL_NO_VENDOR = 1; # we want to link to OpenSSL provided by Nix |
||||
|
||||
# don't build SDK samples that require wasm-enabled rust |
||||
cargoBuildFlags = [ "-p" "neard" ]; |
||||
buildAndTestSubdir = "neard"; |
||||
doCheck = false; # needs network |
||||
|
||||
buildInputs = [ zlib elfutils openssl ]; |
||||
buildInputs = [ |
||||
zlib |
||||
openssl |
||||
]; |
||||
|
||||
nativeBuildInputs = [ |
||||
cmake |
||||
python3 |
||||
pkg-config |
||||
protobuf |
||||
perl |
||||
]; |
||||
|
||||
# fat LTO requires ~3.4GB RAM |
||||
requiredSystemFeatures = [ "big-parallel" ]; |
||||
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; |
||||
BINDGEN_EXTRA_CLANG_ARGS = "-isystem ${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include"; |
||||
|
||||
meta = with lib; { |
||||
description = "Reference client for NEAR Protocol"; |
||||
homepage = "https://github.com/near/nearcore"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ mic92 ]; |
||||
platforms = platforms.unix; |
||||
license = licenses.gpl3; |
||||
maintainers = with maintainers; [ mic92 mikroskeem ]; |
||||
# only x86_64 is supported in nearcore because of sse4+ support, macOS might |
||||
# be also possible |
||||
platforms = [ "x86_64-linux" ]; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,36 @@ |
||||
{ lib, writeTextFile, runtimeShell, drawio, xvfb-run }: |
||||
|
||||
writeTextFile { |
||||
name = "${drawio.pname}-headless-${drawio.version}"; |
||||
|
||||
executable = true; |
||||
destination = "/bin/drawio"; |
||||
text = '' |
||||
#!${runtimeShell} |
||||
|
||||
# Electron really wants a configuration directory to not die with: |
||||
# "Error: Failed to get 'appData' path" |
||||
# so we give it some temp dir as XDG_CONFIG_HOME |
||||
tmpdir=$(mktemp -d) |
||||
|
||||
function cleanup { |
||||
rm -rf "$tmpdir" |
||||
} |
||||
trap cleanup EXIT |
||||
|
||||
# Drawio needs to run in a virtual X session, because Electron |
||||
# refuses to work and dies with an unhelpful error message otherwise: |
||||
# "The futex facility returned an unexpected error code." |
||||
XDG_CONFIG_HOME="$tmpdir" ${xvfb-run}/bin/xvfb-run ${drawio}/bin/drawio $@ |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "xvfb wrapper around drawio"; |
||||
longDescription = '' |
||||
A wrapper around drawio for running in headless environments. |
||||
Runs drawio under xvfb-run, with configuration going to a temporary |
||||
directory. |
||||
''; |
||||
maintainers = with maintainers; [ qyliss tfc ]; |
||||
}; |
||||
} |
@ -0,0 +1,24 @@ |
||||
{ lib, fetchFromGitHub, stdenv, cmake, libssh, openssl }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "rtrlib"; |
||||
version = "0.8.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
repo = pname; |
||||
owner = "rtrlib"; |
||||
rev = "v${version}"; |
||||
sha256 = "sha256-ISb4ojcDvXY/88GbFMrA5V5+SGE6CmE5D+pokDTwotQ="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake ]; |
||||
buildInputs = [ libssh openssl ]; |
||||
|
||||
meta = with lib; { |
||||
description = "An open-source C implementation of the RPKI/Router Protocol client"; |
||||
homepage = "https://github.com/rtrlib/rtrlib"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ Anillc ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -1,24 +1,41 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchurl |
||||
, fetchFromGitHub |
||||
, pytestCheckHook |
||||
, pythonOlder |
||||
, six |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "mox"; |
||||
version = "0.5.3"; |
||||
version = "0.7.8"; |
||||
format = "setuptools"; |
||||
|
||||
src = fetchurl { |
||||
url = "http://pymox.googlecode.com/files/${pname}-${version}.tar.gz"; |
||||
sha256 = "4d18a4577d14da13d032be21cbdfceed302171c275b72adaa4c5997d589a5030"; |
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "ivancrneto"; |
||||
repo = "pymox"; |
||||
rev = "v${version}"; |
||||
hash = "sha256-gODE9IGDk3WtO8iPOlp98fGp6Ih2laA3YlOHmq62m8Y="; |
||||
}; |
||||
|
||||
# error: invalid command 'test' |
||||
doCheck = false; |
||||
propagatedBuildInputs = [ |
||||
six |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
pythonImportsCheck = [ |
||||
"mox" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://pymox.readthedocs.io/"; |
||||
description = "A mock object framework for Python"; |
||||
description = "Mock object framework"; |
||||
homepage = "https://github.com/ivancrneto/pymox"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ ]; |
||||
}; |
||||
|
||||
} |
||||
|
@ -1,31 +0,0 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchPypi |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "ttp-templates"; |
||||
version = "0.1.1"; |
||||
format = "setuptools"; |
||||
|
||||
src = fetchPypi { |
||||
pname = "ttp_templates"; |
||||
inherit version; |
||||
sha256 = "0vg7k733i8jqnfz8mpq8kzr2l7b7drk29zkzik91029f6w7li007"; |
||||
}; |
||||
|
||||
# drop circular dependency on ttp |
||||
postPatch = '' |
||||
substituteInPlace setup.py --replace '"ttp>=0.6.0"' "" |
||||
''; |
||||
|
||||
# circular dependency on ttp |
||||
doCheck = false; |
||||
|
||||
meta = with lib; { |
||||
description = "Template Text Parser Templates"; |
||||
homepage = "https://github.com/dmulyalin/ttp_templates"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ hexa ]; |
||||
}; |
||||
} |
Loading…
Reference in new issue