initial commit
This commit is contained in:
commit
4b47899a3d
5 changed files with 396 additions and 0 deletions
88
flake.nix
Normal file
88
flake.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
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
|
||||
python-cryptography-fernet-wrapper
|
||||
python-dotenv
|
||||
python-lsp-server
|
||||
requests
|
||||
ruff
|
||||
simplematrixbotlib
|
||||
]
|
||||
))
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue