-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
189 additions
and
162 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 |
---|---|---|
@@ -1,69 +1,89 @@ | ||
{src, stdenv, fetchzip, pkg-config, autoreconfHook, taler-exchange, taler-merchant, libgcrypt, libmicrohttpd, jansson, libsodium, postgresql, curl, recutils, libuuid, lib, gnunet, makeWrapper, which, jq}: | ||
let | ||
gnunet' = (gnunet.override { postgresqlSupport = true; }); | ||
{ | ||
src, | ||
stdenv, | ||
fetchzip, | ||
pkg-config, | ||
autoreconfHook, | ||
taler-exchange, | ||
taler-merchant, | ||
libgcrypt, | ||
libmicrohttpd, | ||
jansson, | ||
libsodium, | ||
postgresql, | ||
curl, | ||
recutils, | ||
libuuid, | ||
lib, | ||
gnunet, | ||
makeWrapper, | ||
which, | ||
jq, | ||
}: let | ||
gnunet' = gnunet.override {postgresqlSupport = true;}; | ||
in | ||
stdenv.mkDerivation rec { | ||
pname = "anastasis"; | ||
version = "0.2.0"; | ||
src = fetchzip { | ||
url = "mirror://gnu/anastasis/${pname}-${version}.tar.gz"; | ||
sha256 = "sha256-/13AqJUf8dwXhY554ZaXD8EuMPvrr3SoSe05Hc8Q+Io="; | ||
}; | ||
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/ | ||
stdenv.mkDerivation rec { | ||
pname = "anastasis"; | ||
version = "0.2.0"; | ||
src = fetchzip { | ||
url = "mirror://gnu/anastasis/${pname}-${version}.tar.gz"; | ||
sha256 = "sha256-/13AqJUf8dwXhY554ZaXD8EuMPvrr3SoSe05Hc8Q+Io="; | ||
}; | ||
postPatch = '' | ||
patchShebangs src/cli | ||
''; | ||
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 | ||
]} | ||
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/ | ||
''; | ||
doInstallCheck = true; | ||
postInstallCheck = '' | ||
# The author said `make check` is meant to be executed after installation | ||
# FIXME: many tests are skipped | ||
make check | ||
# Check that anastasis-config can find gnunet at runtime | ||
$out/bin/anastasis-config --help > /dev/null | ||
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 | ||
]} | ||
''; | ||
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. | ||
doInstallCheck = true; | ||
postInstallCheck = '' | ||
# The author said `make check` is meant to be executed after installation | ||
# FIXME: many tests are skipped | ||
make check | ||
# Check that anastasis-config can find gnunet at runtime | ||
$out/bin/anastasis-config --help > /dev/null | ||
''; | ||
license = lib.licenses.agpl3Plus; # from the README | ||
homepage = "https://anastasis.lu"; | ||
}; | ||
} | ||
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"; | ||
}; | ||
} |
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