License as MIT, KDE support, nix package and flake

This commit is contained in:
Kat Inskip 2023-11-12 12:56:47 -08:00
parent 3c196d83d0
commit 4a18fa6337
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
19 changed files with 219 additions and 39 deletions

32
package.nix Normal file
View file

@ -0,0 +1,32 @@
{
lib,
buildPythonPackage,
python311Packages,
}: let
pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml);
poetryBlock = pyproject.tool.poetry;
dependencyReplacements = {
wxpython = python311Packages.wxPython_4_2;
};
in
buildPythonPackage rec {
pname = poetryBlock.name;
version = poetryBlock.version;
src = ./.;
doCheck = false;
propagatedBuildInputs = let
dependencyNames = lib.attrNames poetryBlock.dependencies;
dependencies = map (name: python311Packages.${name} or dependencyReplacements.${name}) dependencyNames;
in
dependencies;
meta = with lib; {
description = poetryBlock.description;
homepage = poetryBlock.homepage;
license = licenses.${toLower poetryBlock.license};
maintainers = with lib.maintainers; [kittywitch];
};
}