python3Packages.wagtail-localize: add missing assets (#475355)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
buildNpmPackage,
|
||||
|
||||
# build-system
|
||||
flit-core,
|
||||
@@ -22,11 +23,10 @@
|
||||
freezegun,
|
||||
python,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
let
|
||||
pname = "wagtail-localize";
|
||||
|
||||
version = "1.13.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "wagtail-localize";
|
||||
@@ -35,6 +35,33 @@ buildPythonPackage rec {
|
||||
hash = "sha256-iJwX/N8/aaAjinU1htVasp88fuuZCOomVPgJ1Ymxre4=";
|
||||
};
|
||||
|
||||
assets = buildNpmPackage {
|
||||
pname = "${pname}-assets";
|
||||
npmDepsHash = "sha256-mLZaa3BBvbbgaSgZhsdUVPRXR6X5xy/sWRiOXnzV2cQ=";
|
||||
|
||||
NODE_OPTIONS = "--openssl-legacy-provider";
|
||||
|
||||
inherit version src;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out
|
||||
|
||||
for static_dir in wagtail_localize/static; do
|
||||
cp --parents -r $static_dir $out
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
inherit pname version src;
|
||||
|
||||
pyproject = true;
|
||||
|
||||
build-system = [ flit-core ];
|
||||
|
||||
dependencies = [
|
||||
@@ -56,6 +83,10 @@ buildPythonPackage rec {
|
||||
google-cloud-translate
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
cp -r ${assets}/wagtail_localize .
|
||||
'';
|
||||
|
||||
# See https://github.com/wagtail/wagtail-localize/issues/922
|
||||
patches = [ ./failing-test.patch ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user