aboutsummaryrefslogtreecommitdiff
path: root/flakes/copanier/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flakes/copanier/default.nix')
-rw-r--r--flakes/copanier/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/flakes/copanier/default.nix b/flakes/copanier/default.nix
new file mode 100644
index 0000000..0486c0a
--- /dev/null
+++ b/flakes/copanier/default.nix
@@ -0,0 +1,30 @@
1{ src, glibcLocales, poetry2nix, fetchFromGitHub, python37, fetchpatch }:
2let
3 poetryApp = poetry2nix.mkPoetryApplication rec {
4 inherit src;
5 patches = [ ./fix_reduce.patch ];
6 overrides = poetry2nix.overrides.withDefaults (self: super: {
7 weasyprint = super.weasyprint.overridePythonAttrs (old: {
8 patches = let
9 p0 = (fetchpatch {
10 url = "https://github.com/Kozea/WeasyPrint/commit/47043a1fd7e50a892b9836466f521df85d597c44.patch";
11 sha256 = "18lmz6whjqxdpv4fdmg5vcpk2acdl99kfmp14badpw1jmffw7zl2";
12 postFetch = ''
13 sed -i -e "s/font_filename/filename/" $out
14 '';
15 });
16 p1 = (builtins.elemAt old.patches 1).overrideAttrs(old: {
17 postInstall = ''
18 sed -i -e "s/so.0/so/" $out
19 '';
20 });
21 in [ p0 p1 ];
22 });
23 });
24 pyproject = ./pyproject.toml;
25 poetrylock = ./poetry.lock;
26 python = python37;
27 locales = "${glibcLocales}/lib/locale/locale-archive";
28 };
29in
30 poetryApp