18 nodeSources = srcOnly nodejs;
19 esbuild' = esbuild.override {
26 src = fetchFromGitHub {
30 hash = "sha256-GiQTB/P+7uVGZfUaeM7S/5lGvfHlTl/cFt7XbNfE0qw=";
32 vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
36 customPython = python3.withPackages (p: [ p.setuptools ]);
38 stdenv.mkDerivation (finalAttrs: {
39 pname = "taler-wallet-core";
43 url = "https://git.taler.net/wallet-core.git";
44 rev = "v${finalAttrs.version}";
45 hash = "sha256-9pRhaQNnIzbhahMaTVVZqLTlAxh7GZxoz4Gf3TDldAA=";
57 pnpmDeps = pnpm.fetchDeps {
58 inherit (finalAttrs) pname version src;
59 hash = "sha256-7az1wJ6BK9nPKirtW/fmXo3013JCPf+TNk/aG/mGTfo=";
62 buildInputs = [ nodejs ];
64 # Make a fake git repo with a commit.
65 # Without this, the package does not build.
68 git config user.email "root@localhost"
69 git config user.name "root"
70 git commit --allow-empty -m "Initial commit"
74 patchShebangs packages/*/*.mjs
75 substituteInPlace pnpm-lock.yaml \
76 --replace-fail "esbuild: 0.12.29" "esbuild: ${esbuild'.version}"
83 # After the pnpm configure, we need to build the binaries of all instances
84 # of better-sqlite3. It has a native part that it wants to build using a
85 # script which is disallowed.
86 # Adapted from mkYarnModules.
88 for f in $(find -path '*/node_modules/better-sqlite3' -type d); do
90 npm run build-release --offline --nodedir="${nodeSources}"
91 find build -type f -exec \
92 ${lib.getExe removeReferencesTo} \
93 -t "${nodeSources}" {} \;
98 env.ESBUILD_BINARY_PATH = lib.getExe esbuild';
101 homepage = "https://git.taler.net/wallet-core.git/";
102 description = "CLI wallet for GNU Taler written in TypeScript and Anastasis Web UI";
103 license = lib.licenses.gpl3Plus;
105 # maintained by the team working on NGI-supported software, no group for this yet
107 platforms = lib.platforms.linux;
108 mainProgram = "taler-wallet-cli";