Skip to content

Commit 73208e1

Browse files
committed
Render svg with cairo_svg
1 parent 275110a commit 73208e1

6 files changed

Lines changed: 511 additions & 56 deletions

File tree

flake.lock

Lines changed: 130 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,43 @@
44
inputs = {
55
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
66
flake-utils.url = "github:numtide/flake-utils";
7+
poetry2nix = { url = "github:nix-community/poetry2nix"; };
78
};
89

9-
outputs = { self, nixpkgs, flake-utils }:
10+
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
1011
flake-utils.lib.eachDefaultSystem (system:
1112
let
12-
pythonEnv = pkgs.python312.withPackages (ps: []);
1313
pkgs = import nixpkgs {
1414
inherit system;
1515
};
16+
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; })
17+
mkPoetryEnv mkPoetryApplication defaultPoetryOverrides;
18+
poetryArgs = {
19+
python = pkgs.python312;
20+
projectDir = ./.;
21+
preferWheels = true;
22+
overrides = defaultPoetryOverrides.extend (final: prev: {
23+
click = prev.click.overridePythonAttrs (old: {
24+
buildInputs = (old.buildInputs or [ ]) ++ [ prev.flit-scm ];
25+
});
26+
rmc = prev.rmc.overridePythonAttrs (old: {
27+
buildInputs = (old.buildInputs or [ ]) ++ [ prev.poetry-core ];
28+
});
29+
});
30+
};
31+
pythonEnv = mkPoetryEnv (poetryArgs);
32+
rmcBin = mkPoetryApplication (poetryArgs);
1633
in
1734
{
35+
packages = {
36+
default = rmcBin;
37+
};
1838
devShells.default = pkgs.mkShell {
19-
buildInputs = with pkgs; [
20-
sqlite.dev
21-
poetry
22-
inkscape
39+
buildInputs = [
40+
pkgs.poetry
41+
rmcBin
42+
pythonEnv
2343
];
24-
25-
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
26-
pkgs.sqlite.out
27-
];
2844
};
2945
});
3046
}

0 commit comments

Comments
 (0)