Skip to content

Commit cdbf4d3

Browse files
authored
invoiceplane: add missing translations (#369632)
2 parents a35dd5e + d3fdaba commit cdbf4d3

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

pkgs/by-name/in/invoiceplane/package.nix

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,25 @@
1313
pkg-config,
1414
libsass,
1515
stdenv,
16+
fetchzip,
1617
}:
17-
18+
let
19+
version = "1.6.2";
20+
# Fetch release tarball which contains language files
21+
# https://github.com/InvoicePlane/InvoicePlane/issues/1170
22+
languages = fetchzip {
23+
url = "https://github.com/InvoicePlane/InvoicePlane/releases/download/v${version}/v${version}.zip";
24+
hash = "sha256-ME8ornP2uevvH8DzuI25Z8OV0EP98CBgbunvb2Hbr9M=";
25+
};
26+
in
1827
php.buildComposerProject (finalAttrs: {
1928
pname = "invoiceplane";
20-
version = "1.6.2";
29+
inherit version;
2130

2231
src = fetchFromGitHub {
2332
owner = "InvoicePlane";
2433
repo = "InvoicePlane";
25-
tag = "v${finalAttrs.version}";
34+
rev = "refs/tags/v${version}";
2635
hash = "sha256-E2TZ/FhlVKZpGuczXb/QLn27gGiO7YYlAkPSolTEoeQ=";
2736
};
2837

@@ -64,9 +73,10 @@ php.buildComposerProject (finalAttrs: {
6473
grunt build
6574
'';
6675

67-
# Cleanup
76+
# Cleanup and language files
6877
postInstall = ''
6978
mv $out/share/php/invoiceplane/* $out/
79+
cp -r ${languages}/application/language $out/application/
7080
rm -r $out/{composer.json,composer.lock,CONTRIBUTING.md,docker-compose.yml,Gruntfile.js,package.json,node_modules,yarn.lock,share}
7181
'';
7282

@@ -76,7 +86,7 @@ php.buildComposerProject (finalAttrs: {
7686

7787
meta = {
7888
description = "Self-hosted open source application for managing your invoices, clients and payments";
79-
changelog = "https://github.com/InvoicePlane/InvoicePlane/releases/tag/v${finalAttrs.version}";
89+
changelog = "https://github.com/InvoicePlane/InvoicePlane/releases/tag/v${version}";
8090
homepage = "https://www.invoiceplane.com";
8191
license = lib.licenses.mit;
8292
platforms = lib.platforms.all;

0 commit comments

Comments
 (0)