89 lines
2.5 KiB
Nix
89 lines
2.5 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
};
|
|
|
|
outputs =
|
|
inputs@{ nixpkgs, flake-parts, ... }:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = [
|
|
"x86_64-linux"
|
|
];
|
|
|
|
perSystem =
|
|
{ pkgs, system, ... }:
|
|
let
|
|
python = pkgs.python314.override {
|
|
packageOverrides = self: super: {
|
|
python-cryptography-fernet-wrapper = super.buildPythonPackage rec {
|
|
pname = "python-cryptography-fernet-wrapper";
|
|
version = "1.0.4";
|
|
format = "setuptools";
|
|
|
|
src = pkgs.fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-dPEYr612POscHqq6awbhnMNeXP+0AI5xVGdRcfoRapI=";
|
|
};
|
|
};
|
|
|
|
simplematrixbotlib = super.buildPythonPackage rec {
|
|
pname = "simplematrixbotlib";
|
|
version = "2.12.3";
|
|
pyproject = true;
|
|
|
|
src = pkgs.fetchFromCodeberg {
|
|
owner = "imbev";
|
|
repo = pname;
|
|
rev = "a4e649091b68ea48d7461813fd349b2c6f99b8f4";
|
|
hash = "sha256-RwMRcSKtSz/UQKZI//utgE/iAv5g4zel1eHlsRk9uZk=";
|
|
};
|
|
|
|
propagatedBuildInputs = with self; [
|
|
atomicwrites
|
|
cachetools
|
|
cryptography
|
|
markdown
|
|
matrix-nio
|
|
peewee
|
|
pillow
|
|
poetry-core
|
|
python-cryptography-fernet-wrapper
|
|
python-olm
|
|
toml
|
|
];
|
|
|
|
postPatch = ''
|
|
sed -i 's/10.0.1/12.0.0/g' pyproject.toml
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
in
|
|
{
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
config.permittedInsecurePackages = [
|
|
"olm-3.2.16"
|
|
];
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = [
|
|
(python.withPackages (
|
|
py: with py; [
|
|
mautrix
|
|
pyparsing
|
|
python-cryptography-fernet-wrapper
|
|
python-dotenv
|
|
python-lsp-server
|
|
requests
|
|
ruff
|
|
simplematrixbotlib
|
|
]
|
|
))
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|