Skip to content

Commit

Permalink
anastasis: init at 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Enzime committed Dec 21, 2023
1 parent 2b2917b commit 3859682
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions pkgs/by-name/anastasis/package.nix
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
, jq }:

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";
};
})

0 comments on commit 3859682

Please sign in to comment.