From f5e12a22b5bb9d7942a2da069fef65ba3e146d4e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sun, 27 Oct 2024 11:45:20 +0100 Subject: [PATCH] vcstools: init at 0.1.42 --- pkgs/default.nix | 2 ++ pkgs/vcstools/default.nix | 58 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 pkgs/vcstools/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index ebde5a9991..9309f80aac 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -143,6 +143,8 @@ self: super: with self.lib; { rosinstall-generator = pyFinal.callPackage ./rosinstall-generator { }; rospkg = pyFinal.callPackage ./rospkg { }; + + vcstools = pyFinal.callPackage ./vcstools { }; }) ]; diff --git a/pkgs/vcstools/default.nix b/pkgs/vcstools/default.nix new file mode 100644 index 0000000000..5f95799c0d --- /dev/null +++ b/pkgs/vcstools/default.nix @@ -0,0 +1,58 @@ +{ + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + lib, + looseversion, + python-dateutil, + pyyaml, + setuptools, +}: + +buildPythonPackage rec { + pname = "vcstools"; + version = "0.1.42"; + pyproject = true; + + src = fetchFromGitHub { + owner = "vcstools"; + repo = "vcstools"; + rev = version; + hash = "sha256-ZvA6+aMzE/+RDJtlABiHILhiM7fNW1ZucGRHZcwraRU="; + }; + + patches = [ + # fix python 3.12 compatibility: don't import imp + (fetchpatch { + url = "https://github.com/meyerj/vcstools/commit/1d32c81af6768345b413de364c9bc526d6309f5d.patch"; + hash = "sha256-KeuKyNUDo/GYxP5NMXzibGtUwAxbRCZ8nqNkxLh3LeI="; + }) + # fix syntax warning + (fetchpatch { + url = "https://github.com/meyerj/vcstools/commit/29236587452e02b618ef4b7467b0e45768a422e6.patch"; + hash = "sha256-GY9Or0BZYD2GS9z4IsQxhHtQsm5ZuoSlEQ+GMDatbqM="; + }) + # fix python 3.12 compatibility: don't import distutils + (fetchpatch { + url = "https://github.com/nim65s/vcstools/commit/b940aacc4bcf96892b5d75ae6e58dc9bba5fff60.patch"; + hash = "sha256-yKDrd9t0vuuDqyDUlmOIlL4l1Uc6svtXVxuavnV0uOM="; + }) + ]; + + build-system = [ setuptools ]; + + dependencies = [ + looseversion + python-dateutil + pyyaml + ]; + + pythonImportsCheck = [ "vcstools" ]; + + meta = { + description = "Python library for interacting with various VCS systems"; + homepage = "https://github.com/vcstools/vcstools"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ nim65s ]; + }; +}