From e65518d7b343e2071d41972089b41e7e4ad3318f Mon Sep 17 00:00:00 2001 From: eljamm Date: Wed, 3 Jun 2026 10:57:40 +0200 Subject: [PATCH] {python3Packages.,}foss-flame: init at 0.21.8 Assisted-By: nix-init --- pkgs/by-name/fo/foss-flame/package.nix | 3 + .../python-modules/foss-flame/default.nix | 86 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 91 insertions(+) create mode 100644 pkgs/by-name/fo/foss-flame/package.nix create mode 100644 pkgs/development/python-modules/foss-flame/default.nix diff --git a/pkgs/by-name/fo/foss-flame/package.nix b/pkgs/by-name/fo/foss-flame/package.nix new file mode 100644 index 000000000000..9948ec41f3e6 --- /dev/null +++ b/pkgs/by-name/fo/foss-flame/package.nix @@ -0,0 +1,3 @@ +{ python3Packages }: + +python3Packages.toPythonApplication python3Packages.foss-flame diff --git a/pkgs/development/python-modules/foss-flame/default.nix b/pkgs/development/python-modules/foss-flame/default.nix new file mode 100644 index 000000000000..e5d125716872 --- /dev/null +++ b/pkgs/development/python-modules/foss-flame/default.nix @@ -0,0 +1,86 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies + jsonschema, + license-expression, + osadl-matrix, + pyyaml, + spdx-license-list, + + # tests + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "foss-flame"; + version = "0.21.8"; + __structuredAttrs = true; + pyproject = true; + + src = fetchFromGitHub { + owner = "hesa"; + repo = "foss-licenses"; + tag = finalAttrs.version; + hash = "sha256-vtiwY5l9zlNKQdoO3NSOG+9U1chqD5tvzBE20xSnGPA="; + postFetch = '' + # We have `CONSIDERATIONS.md` and `considerations.md` with almost the + # same contents, but because Darwin is case-insensitive, having both + # files results in a conflict, and therefore different source hashes than + # other platforms. + find $out -iname "considerations.md" -delete + ''; + }; + + sourceRoot = "${finalAttrs.src.name}/python"; + + build-system = [ + setuptools + ]; + + dependencies = [ + jsonschema + license-expression + osadl-matrix + pyyaml + spdx-license-list + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # Upstream setup.cfg has addopts, requiring pytest-{cov,forked,random-order}. + # Clearing it is simpler than replicating those plugins, especially since + # they only affect how tests run. + pytestFlags = [ + "--override-ini=addopts=" + ]; + + preCheck = '' + ln -s ../tests . + ''; + + pythonImportsCheck = [ + "flame" + ]; + + meta = { + description = "License meta data: data and python module/cli"; + homepage = "https://github.com/hesa/foss-licenses"; + changelog = "https://github.com/hesa/foss-licenses/releases/tag/${finalAttrs.src.tag}"; + mainProgram = "flame"; + license = with lib.licenses; [ + bsd2 + cc-by-40 + gpl3Plus + ]; + maintainers = with lib.maintainers; [ eljamm ]; + teams = with lib.teams; [ ngi ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4323712b78d8..8ee5bf59d131 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5964,6 +5964,8 @@ self: super: with self; { fortune = callPackage ../development/python-modules/fortune { }; + foss-flame = callPackage ../development/python-modules/foss-flame { }; + foundationdb = callPackage ../development/python-modules/foundationdb { inherit (pkgs) foundationdb; };