From 33c4a9b1a3ae7ea87a7e46ca29d612c1d0cee65d Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 26 May 2025 18:02:48 +0100 Subject: [PATCH] python3Packages.oca-port: fix dependencies and build from source It now depends on giturlparse. Build was broken because of that. I took the chance to update to newer build system, and build from source. --- .../python-modules/oca-port/default.nix | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/oca-port/default.nix b/pkgs/development/python-modules/oca-port/default.nix index 70720e3e130a..71194b3233c0 100644 --- a/pkgs/development/python-modules/oca-port/default.nix +++ b/pkgs/development/python-modules/oca-port/default.nix @@ -1,33 +1,35 @@ { buildPythonPackage, click, - fetchPypi, + fetchFromGitHub, gitpython, + giturlparse, lib, nix-update-script, requests, setuptools-scm, - setuptools, }: buildPythonPackage rec { pname = "oca-port"; version = "0.18"; - format = "pyproject"; + pyproject = true; - src = fetchPypi { + src = fetchFromGitHub { inherit version; - pname = "oca_port"; - hash = "sha256-JqSnt23SQSyh/7hKAy04k/ocpAN61qQ+VebQv5Ddbjk="; + owner = "OCA"; + repo = "oca-port"; + tag = "v${version}"; + hash = "sha256-r32ePlbg0GjryB5HDx0nQTq71lG/o+4sUFRdKW/K5ys="; }; - nativeBuildInputs = [ - setuptools + build-system = [ setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ click + giturlparse gitpython requests ]; @@ -36,10 +38,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "oca_port" ]; - meta = with lib; { + meta = { description = "Tool helping to port an addon or missing commits of an addon from one branch to another"; homepage = "https://github.com/OCA/oca-port"; - license = licenses.lgpl3Plus; - maintainers = with maintainers; [ yajo ]; + license = lib.licenses.lgpl3Plus; + maintainers = with lib.maintainers; [ yajo ]; }; }