firefly-iii: Download translations from release
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchzip,
|
||||
stdenvNoCC,
|
||||
nodejs-slim,
|
||||
fetchNpmDeps,
|
||||
@@ -10,13 +11,20 @@
|
||||
nix-update-script,
|
||||
dataDir ? "/var/lib/firefly-iii",
|
||||
}:
|
||||
|
||||
let
|
||||
php = php85;
|
||||
version = "6.6.2";
|
||||
|
||||
# Release tarball contains translations downloaded from crowdin
|
||||
releaseTarball = fetchzip {
|
||||
url = "https://github.com/firefly-iii/firefly-iii/releases/download/v${version}/FireflyIII-v${version}.tar.gz";
|
||||
stripRoot = false;
|
||||
hash = "sha256-vPuLCjU8MzV5odoDl9QQXj4kKnT6QBSAPwvekMxJtEM=";
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "firefly-iii";
|
||||
version = "6.6.2";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "firefly-iii";
|
||||
@@ -55,6 +63,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit releaseTarball;
|
||||
phpPackage = php;
|
||||
tests = nixosTests.firefly-iii;
|
||||
updateScript = nix-update-script {
|
||||
@@ -68,6 +77,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
postInstall = ''
|
||||
chmod -R u+w $out/share
|
||||
mv $out/share/php/firefly-iii/* $out/
|
||||
|
||||
# Copy language files from release tarball (contains all translations)
|
||||
cp -r ${finalAttrs.passthru.releaseTarball}/resources/lang/* $out/resources/lang/
|
||||
|
||||
rm -R $out/share $out/storage $out/bootstrap/cache $out/node_modules
|
||||
ln -s ${dataDir}/storage $out/storage
|
||||
ln -s ${dataDir}/cache $out/bootstrap/cache
|
||||
|
||||
Reference in New Issue
Block a user