-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from ngi-nix/add/anastasis
anastasis: init at 0.4.0
- Loading branch information
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
stdenv, | ||
fetchzip, | ||
pkg-config, | ||
autoreconfHook, | ||
taler-exchange, | ||
taler-merchant, | ||
libgcrypt, | ||
libmicrohttpd, | ||
jansson, | ||
libsodium, | ||
postgresql, | ||
curl, | ||
recutils, | ||
libuuid, | ||
lib, | ||
gnunet, | ||
makeWrapper, | ||
which, | ||
}: | ||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "anastasis"; | ||
version = "0.4.0"; | ||
|
||
src = fetchzip { | ||
url = "mirror://gnu/anastasis/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; | ||
sha256 = "sha256-PMBHfJsrL/7w2s03J9hmeuZZJDt1p9wJ8iA4HykU3E8="; | ||
}; | ||
|
||
postPatch = '' | ||
patchShebangs src/cli | ||
''; | ||
|
||
outputs = ["out" "configured"]; | ||
|
||
nativeBuildInputs = [ | ||
pkg-config # hook that adds pkg-config files of buildInputs | ||
autoreconfHook # hook that triggers autoreconf to get the configure script | ||
makeWrapper # for wrapProgram | ||
]; | ||
|
||
buildInputs = [ | ||
taler-exchange | ||
taler-merchant | ||
libgcrypt | ||
libmicrohttpd | ||
libsodium | ||
postgresql | ||
curl | ||
jansson | ||
recutils | ||
libuuid | ||
]; | ||
|
||
configureFlags = [ | ||
"--with-gnunet=${gnunet}" | ||
"--with-exchange=${taler-exchange}" | ||
"--with-merchant=${taler-merchant}" | ||
]; | ||
|
||
postConfigure = '' | ||
mkdir -p $configured | ||
cp -r ./* $configured/ | ||
''; | ||
|
||
postInstall = '' | ||
wrapProgram $out/bin/anastasis-config --prefix PATH : ${lib.makeBinPath [ | ||
# Fix "anastasis-config-wrapped needs gnunet-config to be installed" | ||
# in src/cli/test_anastasis_reducer_backup_enter_user_attributes.sh | ||
# (NB: --with-gnunet was not enough) | ||
gnunet | ||
# needed by $out/bin/anastasis-config during postInstallCheck | ||
which | ||
]} | ||
''; | ||
|
||
doInstallCheck = true; | ||
|
||
postInstallCheck = '' | ||
# Check that anastasis-config can find gnunet at runtime | ||
$out/bin/anastasis-config --help > /dev/null | ||
''; | ||
|
||
meta = { | ||
description = '' | ||
GNU Anastasis is a key backup and recovery tool from the GNU project. | ||
This package includes the backend run by the Anastasis providers as | ||
well as libraries for clients and a command-line interface. | ||
''; | ||
license = lib.licenses.agpl3Plus; # from the README | ||
homepage = "https://anastasis.lu"; | ||
}; | ||
}) |