mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-29 18:06:43 +03:00
more autoconfiscation
This commit is contained in:
parent
a26eabbbf9
commit
8e596ca365
@ -15,7 +15,7 @@ let
|
||||
|
||||
urcrypt = import ./urcrypt {
|
||||
inherit libaes_siv;
|
||||
inherit (pkgs) stdenv openssl gmp;
|
||||
inherit (pkgs) stdenv pkgconfig openssl gmp;
|
||||
inherit (deps) ed25519 argon2 secp256k1;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, openssl, gmp, secp256k1, argon2, scrypt, libaes_siv }:
|
||||
{ stdenv, pkgconfig, openssl, gmp, secp256k1, argon2, scrypt, libaes_siv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "urcrypt";
|
||||
@ -6,6 +6,6 @@ stdenv.mkDerivation rec {
|
||||
src = ../../../pkg/urcrypt;
|
||||
|
||||
buildInputs = [
|
||||
openssl gmp secp256k1 argon2 scrypt libaes_siv
|
||||
pkgconfig openssl gmp secp256k1 argon2 scrypt libaes_siv
|
||||
];
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ in
|
||||
|
||||
import ./default.nix {
|
||||
inherit (pkgs)
|
||||
stdenv openssl gmp;
|
||||
stdenv openssl gmp pkgconfig;
|
||||
inherit (deps)
|
||||
libaes_siv argon2 scrypt secp256k1;
|
||||
}
|
||||
|
7
pkg/urcrypt/.gitignore
vendored
7
pkg/urcrypt/.gitignore
vendored
@ -1,6 +1,11 @@
|
||||
build-aux
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
config.h.*
|
||||
autom4te.cache
|
||||
config.h*
|
||||
config.status
|
||||
config.log
|
||||
configure
|
||||
.deps
|
||||
.dirstamp
|
||||
|
@ -2,9 +2,16 @@ ACLOCAL_AMFLAGS = -I build-aux/m4
|
||||
|
||||
lib_LTLIBRARIES = liburcrypt.la
|
||||
include_HEADERS = urcrypt.h
|
||||
noinst_HEADERS = $(ed25519_includes) $(ge_additions_includes)
|
||||
liburcrypt_la_SOURCES = urcrypt.c $(ed25519_sources) $(ge_additions_sources)
|
||||
liburcrypt_la_CPPFLAGS = -Ied25519/src -Ige-additions
|
||||
noinst_HEADERS = $(ed25519_includes) \
|
||||
$(ge_additions_includes) \
|
||||
$(argon2_includes)
|
||||
liburcrypt_la_SOURCES = urcrypt.c \
|
||||
$(ed25519_sources) \
|
||||
$(ge_additions_sources) \
|
||||
$(argon2_sources)
|
||||
liburcrypt_la_CFLAGS = $(SECP256K1_CFLAGS)
|
||||
liburcrypt_la_CPPFLAGS = -Ied25519/src -Ige-additions -Iargon2/include
|
||||
liburcrypt_la_LIBADD = -lgmp -laes_siv $(SECP256K1_LIBS)
|
||||
|
||||
### ed25519
|
||||
ed25519_sources = ed25519/src/add_scalar.c ed25519/src/keypair.c \
|
||||
@ -20,3 +27,15 @@ ed25519_includes = ed25519/src/fixedint.h ed25519/src/ge.h \
|
||||
### ge-additions
|
||||
ge_additions_sources = ge-additions/ge-additions.c
|
||||
ge_additions_includes = ge-additions/ge-additions.h
|
||||
|
||||
### argon2
|
||||
argon2_sources = argon2/src/argon2.c argon2/src/core.c \
|
||||
argon2/src/blake2/blake2b.c argon2/src/thread.c \
|
||||
argon2/src/encoding.c
|
||||
argon2_includes = argon2/include/argon2.h argon2/src/core.h \
|
||||
argon2/src/blake2/blake2.h argon2/src/thread.h \
|
||||
argon2/src/encoding.h \
|
||||
argon2/src/blake2/blake2-impl.h \
|
||||
argon2/src/blake2/blamka-round-opt.h \
|
||||
argon2/src/blake2/blamka-round-ref.h
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
project('argon2', 'c', version : '1')
|
||||
|
||||
legacy_meson = false
|
||||
|
||||
detect_meson_version = run_command('meson', '--version')
|
||||
meson_ver = detect_meson_version.stdout()
|
||||
|
||||
if(meson_ver == '0.29.0\n')
|
||||
legacy_meson = true
|
||||
elif(not meson.version().version_compare('>=0.40.0'))
|
||||
error('Meson 0.29.0 is last legacy version supported. Otherwise please upgrade to 0.40.0 or higher.')
|
||||
endif
|
||||
|
||||
lib_src = ['src/argon2.c',
|
||||
'src/bench.c',
|
||||
'src/blake2/blake2b.c',
|
||||
'src/core.c',
|
||||
'src/encoding.c',
|
||||
'src/genkat.c',
|
||||
'src/opt.c',
|
||||
'src/ref.c',
|
||||
'src/run.c',
|
||||
'src/test.c',
|
||||
'src/thread.c']
|
||||
|
||||
inc = include_directories(['./include'])
|
||||
|
||||
lib = static_library('argon2', sources: lib_src,
|
||||
include_directories: inc,
|
||||
c_args: ['-Wall', '-Wno-unused-value', '-Wno-unused-function', '-DARGON2_NO_THREADS'],
|
||||
install: false)
|
||||
|
||||
argon2_dep = declare_dependency(include_directories : inc, link_with : lib)
|
@ -11,16 +11,14 @@ AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
|
||||
AM_PROG_AR
|
||||
LT_INIT
|
||||
AC_PROG_CC
|
||||
AC_CHECK_LIB([gmp], [mpz_init])
|
||||
AC_CHECK_LIB([aes_siv], [AES_SIV_CTX_new])
|
||||
|
||||
PKG_CHECK_MODULES([SECP256K1], [libsecp256k1])
|
||||
|
||||
## Checks for libraries.
|
||||
## FIXME: Replace `main' with a function in `-laes_siv':
|
||||
## FIXME: Replace `main' with a function in `-largon2':
|
||||
#AC_CHECK_LIB([argon2], [main])
|
||||
## FIXME: Replace `main' with a function in `-led25519':
|
||||
#AC_CHECK_LIB([ed25519], [main])
|
||||
## FIXME: Replace `main' with a function in `-lgmp':
|
||||
#AC_CHECK_LIB([gmp], [main])
|
||||
## FIXME: Replace `main' with a function in `-lsecp256k1':
|
||||
#AC_CHECK_LIB([secp256k1], [main])
|
||||
## FIXME: Replace `main' with a function in `-lssl':
|
||||
|
Loading…
Reference in New Issue
Block a user