Add flake

This commit is contained in:
clerie 2022-10-16 10:43:13 +02:00
parent 710d68268f
commit ff480cb8b5
2 changed files with 158 additions and 0 deletions

48
flake.lock Normal file
View File

@ -0,0 +1,48 @@
{
"nodes": {
"mitel-ommclient2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1665864178,
"narHash": "sha256-dZ4YVEn4E29ubYqDSuNfVIuOnHEZ4sZGUuODdQsvtaU=",
"ref": "refs/heads/main",
"rev": "aef2761f9fba079f33f41337b443350cb314eeef",
"revCount": 67,
"type": "git",
"url": "https://git.clerie.de/clerie/mitel_ommclient2.git"
},
"original": {
"type": "git",
"url": "https://git.clerie.de/clerie/mitel_ommclient2.git"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1665732960,
"narHash": "sha256-WBZ+uSHKFyjvd0w4inbm0cNExYTn8lpYFcHEes8tmec=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4428e23312933a196724da2df7ab78eb5e67a88e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"mitel-ommclient2": "mitel-ommclient2",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

110
flake.nix Normal file
View File

@ -0,0 +1,110 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
mitel-ommclient2 = {
url = "git+https://git.clerie.de/clerie/mitel_ommclient2.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, mitel-ommclient2, ... }: {
packages.x86_64-linux = let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
in {
fieldpoc = pkgs.python3Packages.buildPythonPackage {
pname = "fieldpoc";
version = "0.11.0";
src = ./.;
format = "pyproject";
buildInputs = [ pkgs.python3Packages.hatchling ];
propagatedBuildInputs = [
mitel-ommclient2.packages.x86_64-linux.mitel-ommclient2
pkgs.python3Packages.sqlalchemy
self.packages.x86_64-linux.ywsd
self.packages.x86_64-linux.diffsync
];
};
ywsd = pkgs.python3Packages.buildPythonApplication rec {
pname = "ywsd";
version = "0.11.0";
src = pkgs.fetchFromGitHub {
owner = "eventphone";
repo = pname;
rev = "905a5bdee7a779eef83bc96d9c9a5b7a2212d5f0";
sha256 = "sha256-UNpr1OCmb7U6TisgVcnZVSbhdgQ3AREX/XNXru+UsF4=";
};
propagatedBuildInputs = [
pkgs.python3Packages.aiopg
pkgs.python3Packages.aiohttp
self.packages.x86_64-linux.python-yate
pkgs.python3Packages.pyyaml
pkgs.python3Packages.sqlalchemy
];
doCheck = false;
};
python-yate = pkgs.python3Packages.buildPythonPackage rec {
pname = "python-yate";
version = "0.3.1";
src = pkgs.python3Packages.fetchPypi {
inherit pname version;
sha256 = "5e806802dc47a35c855b60cd459a2c98fb0109c7fc099f3e9f83a1a38abf9f90";
};
propagatedBuildInputs = [
pkgs.python3Packages.async-timeout
];
pythonImportsCheck = [ "yate" ];
};
diffsync = pkgs.python3Packages.buildPythonPackage rec {
pname = "diffsync";
version = "1.5.1";
src = pkgs.python3Packages.fetchPypi {
inherit pname version;
sha256 = "84a736d03d385bd07cf7c86f57385d4130c3c3273bf7bc90febe2fa530ee1aa6";
};
propagatedBuildInputs = [
pkgs.python3Packages.pydantic
(pkgs.python3Packages.override {
overrides = (self: super: {
structlog = super.structlog.overrideAttrs (old: rec {
version = "21.5.0";
src = pkgs.fetchFromGitHub {
owner = "hynek";
repo = "structlog";
rev = "refs/tags/${version}";
sha256 = "0bc5lj0732j0hjq89llgrncyzs6k3aaffvg07kr3la44w0hlrb4l";
};
});
});
}).structlog
pkgs.python3Packages.colorama
pkgs.python3Packages.redis
];
pythonImportsCheck = [ "diffsync" ];
};
};
hydraJobs = {
inherit (self)
packages;
};
};
}