Skip to content

Commit

Permalink
Update all deps, use nixos-unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
dpausp committed Oct 31, 2023
1 parent f684889 commit b7dd618
Show file tree
Hide file tree
Showing 4 changed files with 638 additions and 651 deletions.
115 changes: 85 additions & 30 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
description = "ekklesia-portal";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
devenv.url = "github:cachix/devenv";
poetry2nix = {
url = "github:dpausp/poetry2nix";
Expand All @@ -28,8 +28,7 @@
perSystem = { config, self', inputs', pkgs, system, ... }:
let
deps = import ./nix/deps.nix {
poetry2nix = inputs'.poetry2nix.legacyPackages;
poetry = inputs'.poetry2nix.packages.poetry;
poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
inherit pkgs;
};

Expand Down
27 changes: 20 additions & 7 deletions nix/deps.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, poetry2nix, poetry }:
{ pkgs, poetry2nix }:

with builtins;

Expand All @@ -9,6 +9,7 @@ let
javascriptDeps = pkgs.callPackage ./javascript_deps.nix { };
font-awesome = pkgs.callPackage ./font-awesome.nix { };
python = pkgs.python311;
poetry = (pkgs.poetry.override { python3 = python; });

overrides = poetry2nix.overrides.withDefaults (
self: super:
Expand All @@ -27,10 +28,16 @@ let
pnames);
in
{
mimesis-factory = super.mimesis-factory.overridePythonAttrs (old: {
buildInputs = old.buildInputs ++ [ self.poetry-core ];
patchPhase = ''
substituteInPlace pyproject.toml --replace poetry.masonry poetry.core.masonry
'';
});
pypugjs = super.pypugjs.overridePythonAttrs (
old: {
format = "setuptools";
buildInputs = old.buildInputs ++ [ poetry ];
buildInputs = old.buildInputs ++ [ self.poetry-core ];
}
);
} //
Expand All @@ -49,17 +56,22 @@ let
[ "base32-crockford" ]
) //
(addPythonBuildDeps
[ self.flit-core ]
[ "colored" ]
[ self.flit-core ] [
"cloudpickle"
"colored"
]
) //
(addPythonBuildDeps
[ self.poetry self.greenlet ] [
"alembic"
[ self.poetry-core ] [
"ekklesia-common"
"iso8601"
"mimesis-factory"
"more-browser-session"
"more-babel-i18n"
]) //
(addPythonBuildDeps
[ self.poetry-core self.greenlet ] [
"alembic"
"eliot-tree"
"pytest-factoryboy"
"sqlalchemy"
"sqlalchemy-utils"
Expand All @@ -75,6 +87,7 @@ let
mkPoetryApplication = args:
poetry2nix.mkPoetryApplication (args // {
inherit overrides;
inherit python;
});

inherit (poetry2nix.mkPoetryPackages {
Expand Down
Loading

0 comments on commit b7dd618

Please sign in to comment.