about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/dot2tex
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-08-23 10:09:14 +0000
committerAlyssa Ross <hi@alyssa.is>2023-08-26 09:07:03 +0000
commit63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f (patch)
treed58934cb48f9c953b19a0d0d5cffc0d0c5561471 /nixpkgs/pkgs/development/python-modules/dot2tex
parentc4eef3dacb2a3d359561f30917d9e3cc4e041be9 (diff)
parent91a22f76cd1716f9d0149e8a5c68424bb691de15 (diff)
downloadnixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.gz
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.bz2
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.lz
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.xz
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.zst
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/dot2tex')
-rw-r--r--nixpkgs/pkgs/development/python-modules/dot2tex/default.nix19
-rw-r--r--nixpkgs/pkgs/development/python-modules/dot2tex/remove-duplicate-script.patch34
2 files changed, 45 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix b/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
index 955d57ffd5c6..15e0c655f80f 100644
--- a/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
@@ -1,20 +1,22 @@
 { lib
-, python
 , buildPythonPackage
+, fetchpatch
 , fetchPypi
 , substituteAll
 , pyparsing
 , graphviz
+, pytestCheckHook
 , texlive
 }:
 
 buildPythonPackage rec {
   pname = "dot2tex";
   version = "2.11.3";
+  format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1kp77wiv7b5qib82i3y3sn9r49rym43aaqm5aw1bwnzfbbq2m6i9";
+    hash = "sha256-KZoq8FruW74CV6VipQapPieSk9XDjyjQirissyM/584=";
   };
 
   patches = [
@@ -23,24 +25,25 @@ buildPythonPackage rec {
       inherit graphviz;
     })
     ./test.patch # https://github.com/kjellmf/dot2tex/issues/5
+
+    # https://github.com/xyz2tex/dot2tex/pull/104 does not merge cleanly
+    ./remove-duplicate-script.patch
   ];
 
-  propagatedBuildInputs = [ pyparsing ];
+  propagatedBuildInputs = [
+    pyparsing
+  ];
 
   nativeCheckInputs = [
+    pytestCheckHook
     (texlive.combine {
       inherit (texlive) scheme-small preview pstricks;
     })
   ];
 
-  checkPhase = ''
-    ${python.interpreter} tests/test_dot2tex.py
-  '';
-
   meta = with lib; {
     description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
     homepage = "https://github.com/kjellmf/dot2tex";
     license = licenses.mit;
   };
-
 }
diff --git a/nixpkgs/pkgs/development/python-modules/dot2tex/remove-duplicate-script.patch b/nixpkgs/pkgs/development/python-modules/dot2tex/remove-duplicate-script.patch
new file mode 100644
index 000000000000..c67ad62224b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/dot2tex/remove-duplicate-script.patch
@@ -0,0 +1,34 @@
+From 98a0fbd0c4e13df98b8fb69c241665ab774fda2e Mon Sep 17 00:00:00 2001
+From: Theodore Ni <3806110+tjni@users.noreply.github.com>
+Date: Fri, 11 Aug 2023 21:58:14 -0700
+Subject: [PATCH] Remove script with same name as entry point
+
+---
+ dot2tex/dot2tex | 5 -----
+ setup.py        | 1 -
+ 2 files changed, 6 deletions(-)
+ delete mode 100644 dot2tex/dot2tex
+
+diff --git a/dot2tex/dot2tex b/dot2tex/dot2tex
+deleted file mode 100644
+index 278c0b3..0000000
+--- a/dot2tex/dot2tex
++++ /dev/null
+@@ -1,5 +0,0 @@
+-#!/usr/bin/env python
+-from .dot2tex import main
+-
+-if __name__ == '__main__':
+-    main()
+diff --git a/setup.py b/setup.py
+index d05db37..67a3ee8 100644
+--- a/setup.py
++++ b/setup.py
+@@ -21,7 +21,6 @@
+       author_email='kjellmf@gmail.com',
+       url="https://github.com/kjellmf/dot2tex",
+       py_modules=['dot2tex.dot2tex', 'dot2tex.dotparsing'],
+-      scripts=['dot2tex/dot2tex'],
+       classifiers=[
+           'Development Status :: 4 - Beta',
+           'Environment :: Console',
\ No newline at end of file