Skip to content

Commit

Permalink
try symlinking newer gana
Browse files Browse the repository at this point in the history
Error from stdenv:

taler-exchange> Running phase: configurePhase
taler-exchange> make: Entering directory '/build/exchange/contrib/gana/gnu-taler-error-codes'
taler-exchange> recfix --check registry.rec
taler-exchange> cd ../http-status-codes; make ; cd -
taler-exchange> make[1]: Entering directory '/build/exchange/contrib/gana/http-status-codes'
taler-exchange> cat http-status-codes-1.csv | grep -v Unassigned | csv2rec > iana.tmp
taler-exchange> sh: line 1: iana.tmp: Permission denied
taler-exchange> grep: write error: Broken pipe
taler-exchange> make[1]: *** [Makefile:8: iana.tmp] Error 1
taler-exchange> make[1]: Leaving directory '/build/exchange/contrib/gana/http-status-codes'
taler-exchange> /build/exchange/contrib/gana/gnu-taler-error-codes
taler-exchange> recsel -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > combined.xtmp
taler-exchange> sh: line 1: combined.xtmp: Permission denied
taler-exchange> make: *** [Makefile:28: combined.tmp] Error 1
taler-exchange> make: Leaving directory '/build/exchange/contrib/gana/gnu-taler-error-codes'
taler-exchange> /nix/store/d4jf1cbbk494zwgbqz31pxgigpsbh6w2-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context
  • Loading branch information
matusf committed Dec 29, 2023
1 parent 91a9e92 commit 86d59b6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 70 deletions.
79 changes: 26 additions & 53 deletions pkgs/by-name/challenger/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,38 @@
libmicrohttpd,
pkg-config,
postgresql,
# taler-exchange,
# taler-merchant,
taler-exchange,
taler-merchant,
libsodium,
callPackage,
}: let
version = "0.9.3";
taler = callPackage ./taler.nix {};
in
stdenv.mkDerivation rec {
name = "challenger";
inherit version;

gana = fetchgit {
url = "https://git.gnunet.org/gana.git";
rev = "c6caa0a91e01b0c74fd71fce71ee5207264a492c";
sha256 = "sha256-Y/xDgrBRhlyRe2nbQ7FJEgYk2vg7TAdLwyefnAlM8cg=";
};

prebuilt = fetchgit {
url = "https://git.taler.net/docs.git";
rev = "5e47a72e8a2b5086dfdae4078f695155f5ed7af8";
sha256 = "sha256-e5g2Hwasnezdp67j/vy2ij54D5l0V6M08ONKYvPG/Xk=";
};

te = taler-exchange.overrideAttrs (old: {
src = fetchgit {
url = "https://git.taler.net/challenger.git";
url = "https://git.taler.net/exchange.git";
rev = "v${version}";
hash = "sha256-nEEQbU/WogRhciIaIROSxFXtq0q99AifV3XOPQdZZTw=";
sha256 = "sha256-P6YLK/eh5h4a4LV/wTNl1mCwFDBicKlypVceLIvVJgc=";
fetchSubmodules = false;
};

# Taken from ./bootstrap
autoreconfPhase = ''
cd contrib
rm -f Makefile.am
find wallet-core/challenger/ -type f -printf ' %p \\\n' | sort > Makefile.am.ext
# Remove extra '\' at the end of the file
truncate -s -2 Makefile.am.ext
cat Makefile.am.in Makefile.am.ext >> Makefile.am
# Prevent accidental editing of the generated Makefile.am
chmod -w Makefile.am
cd ..
echo "$0: Running autoreconf"
autoreconf -if
postUnpack = ''
# ln -sn ${gana}/* $sourceRoot/contrib/gana
# ln -sn ${prebuilt}/* $sourceRoot/doc/prebuilt
cp -r ${gana}/* $sourceRoot/contrib/gana
cp -r ${prebuilt}/* $sourceRoot/doc/prebuilt
'';

nativeBuildInputs = [
pkg-config
autoreconfHook
];

buildInputs = [
taler.taler-exchange
taler.taler-merchant
gnunet

libmicrohttpd
postgresql

libgcrypt
jansson
libgnurl
curlWithGnuTls
libsodium
];

meta = {
homepage = "https://git.taler.net/challenger.git";
description = "OAuth 2.0-based authentication service that validates user can receive messages at a certain address.";
license = lib.licenses.agpl3Plus;
};
}
});
in
te
20 changes: 3 additions & 17 deletions pkgs/by-name/challenger/taler.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
gettext,
texinfo,
}: let
version = "0.9.3a";
version = "0.9.3";

taler-wallet-core = fetchgit {
url = "https://git.taler.net/wallet-core.git";
Expand All @@ -37,7 +37,7 @@
url = "https://git.taler.net/exchange.git";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-yd67vky8xXPFF0wws5CdKpGD7FyqZFYODD2zwQTxYRk=";
sha256 = "sha256-NgDZF6LNeJI4ZuXEwoRdFG6g0S9xNTVhszzlfAnzVOs=";

# When fetching submodules without the .git folder we get the following error:
# "Server does not allow request for unadvertised object"
Expand Down Expand Up @@ -72,19 +72,6 @@
./contrib/gana-generate.sh
'';

autoreconfPhase = ''
cd contrib
rm -f Makefile.am
find wallet-core/aml-backoffice/ -type f -printf ' %p \\\n' | sort > Makefile.am.ext
# Remove extra '\' at the end of the file
truncate -s -2 Makefile.am.ext
cat Makefile.am.in Makefile.am.ext >> Makefile.am
# Prevent accidental editing of the generated Makefile.am
chmod -w Makefile.am
cd ..
autoreconf -fi
'';

enableParallelBuilding = true;

nativeCheckInputs = [wget curl];
Expand Down Expand Up @@ -117,7 +104,7 @@
url = "https://git.taler.net/merchant.git";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "";
sha256 = "sha256-HewCqyO/7nnIQY9Tgva0k1nTk2LuwLyGK/UUxvx9BG0=";
};
postUnpack = ''
ln -s ${taler-wallet-core}/spa.html $sourceRoot/contrib/
Expand Down Expand Up @@ -151,7 +138,6 @@

nativeCheckInputs = [jq];
doInstallCheck = true;

checkTarget = "check";

meta = with lib; {
Expand Down

0 comments on commit 86d59b6

Please sign in to comment.