mirror of
https://github.com/urbit/shrub.git
synced 2024-12-29 07:03:37 +03:00
obliterate ge-additions package, move to urcrypt
This commit is contained in:
parent
42e1180b0d
commit
7bca3a86cf
@ -20,7 +20,7 @@ let
|
||||
|
||||
vendor =
|
||||
with deps;
|
||||
[ argon2 ed25519 h2o murmur3 scrypt secp256k1 softfloat3 uv ent ge-additions urcrypt ivory-header ca-header ];
|
||||
[ argon2 ed25519 h2o murmur3 scrypt secp256k1 softfloat3 uv ent urcrypt ivory-header ca-header ];
|
||||
|
||||
in
|
||||
|
||||
|
@ -9,24 +9,19 @@ let
|
||||
arvo-ropsten = import ./arvo-ropsten { inherit pkgs; };
|
||||
herb = import ../../pkg/herb { inherit pkgs; };
|
||||
|
||||
ge-additions = import ./ge-additions {
|
||||
inherit pkgs;
|
||||
inherit (deps) ed25519;
|
||||
};
|
||||
|
||||
libaes_siv = import ./libaes_siv {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
urcrypt = import ./urcrypt {
|
||||
inherit ge-additions libaes_siv;
|
||||
inherit libaes_siv;
|
||||
inherit (pkgs) stdenv openssl gmp;
|
||||
inherit (deps) ed25519 argon2 secp256k1;
|
||||
};
|
||||
|
||||
mkUrbit = { debug }:
|
||||
import ./urbit {
|
||||
inherit pkgs ent debug ge-additions urcrypt libaes_siv;
|
||||
inherit pkgs ent debug urcrypt libaes_siv;
|
||||
inherit (deps) argon2 murmur3 uv ed25519 scrypt softfloat3;
|
||||
inherit (deps) secp256k1 h2o ivory-header ca-header;
|
||||
};
|
||||
@ -36,4 +31,4 @@ let
|
||||
|
||||
in
|
||||
|
||||
{ inherit ent ge-additions urcrypt libaes_siv arvo arvo-ropsten herb urbit urbit-debug; }
|
||||
{ inherit ent urcrypt libaes_siv arvo arvo-ropsten herb urbit urbit-debug; }
|
||||
|
@ -1,7 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
cp -r $src ./src
|
||||
chmod -R u+w ./src
|
||||
cd ./src
|
||||
|
||||
PREFIX=$out make install
|
@ -1,12 +0,0 @@
|
||||
{ env_name, env, deps }:
|
||||
|
||||
env.make_derivation rec {
|
||||
name = "ge-additions";
|
||||
builder = ./release.sh;
|
||||
src = ../../../pkg/ge-additions;
|
||||
|
||||
cross_inputs = [ deps.ed25519 ];
|
||||
|
||||
CC = "${env.host}-gcc";
|
||||
AR = "${env.host}-ar";
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{ pkgs, ed25519 }:
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
name = "ge-additions";
|
||||
builder = ./builder.sh;
|
||||
src = ../../../pkg/ge-additions;
|
||||
|
||||
nativeBuildInputs = [ ed25519 ];
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
source $setup
|
||||
|
||||
cp -r $src ./src
|
||||
chmod -R u+w ./src
|
||||
cd ./src
|
||||
|
||||
for dep in $cross_inputs; do
|
||||
export CFLAGS="${CFLAGS-} -I$dep/include"
|
||||
export LDFLAGS="${LDFLAGS-} -L$dep/lib"
|
||||
done
|
||||
|
||||
PREFIX=$out make install
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
debug,
|
||||
argon2, ed25519, ent, ge-additions, urcrypt, libaes_siv, h2o, murmur3, scrypt, secp256k1, softfloat3, uv, ivory-header, ca-header
|
||||
argon2, ed25519, ent, urcrypt, libaes_siv, h2o, murmur3, scrypt, secp256k1, softfloat3, uv, ivory-header, ca-header
|
||||
}:
|
||||
|
||||
let
|
||||
@ -26,7 +26,7 @@ let
|
||||
[ curl gmp sigseg openssl zlib lmdb ];
|
||||
|
||||
vendor =
|
||||
[ argon2 softfloat3 ed25519 ent ge-additions urcrypt libaes_siv h2o scrypt uv murmur3 secp256k1 ivory-header ca-header ];
|
||||
[ argon2 softfloat3 ed25519 ent urcrypt libaes_siv h2o scrypt uv murmur3 secp256k1 ivory-header ca-header ];
|
||||
|
||||
urbit = pkgs.stdenv.mkDerivation {
|
||||
inherit name meta;
|
||||
|
@ -4,7 +4,6 @@
|
||||
ent,
|
||||
name ? "urbit",
|
||||
debug ? false,
|
||||
ge-additions,
|
||||
libaes_siv
|
||||
}:
|
||||
|
||||
@ -16,7 +15,7 @@ let
|
||||
|
||||
vendor =
|
||||
with deps;
|
||||
[ argon2 softfloat3 ed25519 ge-additions urcrypt libaes_siv h2o scrypt uv murmur3 secp256k1 ivory-header ca-header ];
|
||||
[ argon2 softfloat3 ed25519 urcrypt libaes_siv h2o scrypt uv murmur3 secp256k1 ivory-header ca-header ];
|
||||
|
||||
in
|
||||
|
||||
|
@ -10,7 +10,7 @@ import ./default.nix {
|
||||
inherit pkgs;
|
||||
debug = false;
|
||||
inherit (tlon)
|
||||
ent ge-additions urcrypt libaes_siv;
|
||||
ent urcrypt libaes_siv;
|
||||
inherit (deps)
|
||||
argon2 ed25519 h2o murmur3 scrypt secp256k1 softfloat3 uv ivory-header ca-header;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, openssl, gmp, ed25519, secp256k1, ge-additions, argon2, libaes_siv }:
|
||||
{ stdenv, openssl, gmp, ed25519, secp256k1, argon2, libaes_siv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "urcrypt";
|
||||
@ -6,6 +6,6 @@ stdenv.mkDerivation rec {
|
||||
src = ../../../pkg/urcrypt;
|
||||
|
||||
buildInputs = [
|
||||
openssl gmp ed25519 secp256k1 argon2 ge-additions libaes_siv
|
||||
openssl gmp ed25519 secp256k1 argon2 libaes_siv
|
||||
];
|
||||
}
|
||||
|
@ -16,9 +16,6 @@ let
|
||||
ent = env:
|
||||
import ./pkgs/ent/cross.nix env;
|
||||
|
||||
ge-additions = env:
|
||||
import ./pkgs/ge-additions/cross.nix env;
|
||||
|
||||
libaes_siv = env:
|
||||
import ./pkgs/libaes_siv/cross.nix env;
|
||||
|
||||
@ -27,7 +24,6 @@ let
|
||||
inherit debug;
|
||||
name = if debug then "urbit-debug" else "urbit";
|
||||
ent = ent env;
|
||||
ge-additions = ge-additions env;
|
||||
libaes_siv = libaes_siv env;
|
||||
};
|
||||
|
||||
@ -36,7 +32,6 @@ let
|
||||
inherit (plat.env) curl libgmp libsigsegv openssl zlib lmdb;
|
||||
inherit (plat.env) cmake_toolchain;
|
||||
ent = ent plat;
|
||||
ge-additions = ge-additions plat;
|
||||
libaes_siv = libaes_siv plat;
|
||||
urbit = urbit { env = plat; debug = false; };
|
||||
urbit-debug = urbit { env = plat; debug = true; };
|
||||
|
@ -1,20 +0,0 @@
|
||||
CC ?= cc
|
||||
AR ?= ar
|
||||
PREFIX ?= ./out
|
||||
|
||||
################################################################################
|
||||
|
||||
.PHONY: all test install clean
|
||||
|
||||
all: ge-additions.c ge-additions.h
|
||||
$(CC) $(CFLAGS) -O3 -Wall -Werror -pedantic -std=gnu99 -c ge-additions.c
|
||||
$(AR) rcs libge-additions.a ge-additions.o
|
||||
|
||||
install: all
|
||||
@mkdir -p $(PREFIX)/lib/
|
||||
@mkdir -p $(PREFIX)/include/
|
||||
cp libge-additions.a $(PREFIX)/lib/
|
||||
cp ge-additions.h $(PREFIX)/include/
|
||||
|
||||
clean:
|
||||
rm -rf ./out
|
2
pkg/urbit/configure
vendored
2
pkg/urbit/configure
vendored
@ -6,7 +6,7 @@ URBIT_VERSION="0.10.8"
|
||||
|
||||
deps=" \
|
||||
curl gmp sigsegv argon2 ed25519 ent h2o scrypt uv murmur3 secp256k1 \
|
||||
softfloat3 ssl crypto z lmdb ge-additions aes_siv urcrypt pthread \
|
||||
softfloat3 ssl crypto z lmdb aes_siv urcrypt pthread \
|
||||
"
|
||||
|
||||
headers=" \
|
||||
|
@ -9,14 +9,23 @@ PREFIX ?= ./out
|
||||
CFLAGS := $(CFLAGS) -g -O3 -Wall -Werror -pedantic -std=gnu99
|
||||
SOURCES = urcrypt.c urcrypt.h
|
||||
|
||||
liburcrypt.a: $(SOURCES)
|
||||
$(CC) $(CFLAGS) -D URCRYPT_STATIC -c urcrypt.c -o urcrypt-static.o
|
||||
$(AR) rcs liburcrypt.a urcrypt-static.o
|
||||
GEO = ge-additions/ge-additions.o
|
||||
|
||||
liburcrypt.so: $(SOURCES)
|
||||
$(GEO): ge-additions/ge-additions.c ge-additions/ge-additions.h
|
||||
$(CC) $(CFLAGS) -c ge-additions/ge-additions.c -o $(GEO)
|
||||
|
||||
urcrypt-static.o: $(SOURCES) $(GEO)
|
||||
$(CC) $(CFLAGS) -D URCRYPT_STATIC -c urcrypt.c -o urcrypt-static.o
|
||||
|
||||
liburcrypt.a: urcrypt-static.o $(GEO)
|
||||
$(AR) rcs liburcrypt.a urcrypt-static.o $(GEO)
|
||||
|
||||
urcrypt-shared.o: $(SOURCES) $(GEO)
|
||||
$(CC) $(CFLAGS) -fPIC -c urcrypt.c -o urcrypt-shared.o
|
||||
$(CC) -shared urcrypt-shared.o -o liburcrypt.so \
|
||||
-led25519 -lge-additions -lssl -largon2 -laes_siv -lgmp -lsecp256k1 \
|
||||
|
||||
liburcrypt.so: urcrypt-shared.o
|
||||
$(CC) -shared urcrypt-shared.o $(GEO) -o liburcrypt.so \
|
||||
-led25519 -lssl -largon2 -laes_siv -lgmp -lsecp256k1 \
|
||||
-Wl,--no-undefined
|
||||
|
||||
all: liburcrypt.a liburcrypt.so
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "urcrypt.h"
|
||||
#include "ge-additions/ge-additions.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <ed25519.h>
|
||||
#include <ge-additions.h>
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/ripemd.h>
|
||||
|
Loading…
Reference in New Issue
Block a user