mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-20 21:31:32 +03:00
22 lines
418 B
Nix
22 lines
418 B
Nix
|
{ stdenv, sources }:
|
||
|
|
||
|
stdenv.mkDerivation {
|
||
|
pname = "ed25519";
|
||
|
version = sources.ed25519.rev;
|
||
|
src = sources.ed25519;
|
||
|
|
||
|
buildPhase = ''
|
||
|
CFLAGS="-O3 -Wall -I$src/src"
|
||
|
|
||
|
for f in $(find src -type f -name '*.c'); do
|
||
|
$CC $CFLAGS -c $f -o "''${f//\//_}.o"
|
||
|
done
|
||
|
'';
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out/{lib,include}
|
||
|
$AR rcs $out/lib/libed25519.a *.o
|
||
|
cp $src/src/*.h $out/include/
|
||
|
'';
|
||
|
}
|