about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabián Heredia Montiel <303897+fabianhjr@users.noreply.github.com>2024-03-12 15:02:24 -0600
committerGitHub <noreply@github.com>2024-03-12 15:02:24 -0600
commitea2e6ebab0274fc6965994211e83f311da144301 (patch)
treed93f1854c5b614fef3531b0bbf70794e8fe60718 /pkgs
parent6a5341173ca6d91d70a70f5d7432bb9373774690 (diff)
parentcd975261c7594517908b1c39d39a9197baf3b28d (diff)
downloadnixlib-ea2e6ebab0274fc6965994211e83f311da144301.tar
nixlib-ea2e6ebab0274fc6965994211e83f311da144301.tar.gz
nixlib-ea2e6ebab0274fc6965994211e83f311da144301.tar.bz2
nixlib-ea2e6ebab0274fc6965994211e83f311da144301.tar.lz
nixlib-ea2e6ebab0274fc6965994211e83f311da144301.tar.xz
nixlib-ea2e6ebab0274fc6965994211e83f311da144301.tar.zst
nixlib-ea2e6ebab0274fc6965994211e83f311da144301.zip
Merge pull request #292693 from atorres1985-contrib/pyp
pyp: 1.1.0 -> 1.2.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/py/pyp/package.nix95
-rw-r--r--pkgs/development/python-modules/pyp/default.nix56
-rw-r--r--pkgs/top-level/python-packages.nix4
3 files changed, 52 insertions, 103 deletions
diff --git a/pkgs/by-name/py/pyp/package.nix b/pkgs/by-name/py/pyp/package.nix
index 1ba4629220db..08f3fdc63d49 100644
--- a/pkgs/by-name/py/pyp/package.nix
+++ b/pkgs/by-name/py/pyp/package.nix
@@ -1,51 +1,60 @@
 { lib
-, fetchFromGitHub
-, python3
 , bc
+, fetchFromGitHub
 , jq
+, python3
 }:
 
 let
-  version = "1.1.0";
-in python3.pkgs.buildPythonApplication {
-  pname = "pyp";
-  inherit version;
-  format = "pyproject";
-
-  src = fetchFromGitHub {
-    owner = "hauntsaninja";
-    repo = "pyp";
-    rev = "v${version}";
-    hash = "sha256-A1Ip41kxH17BakHEWEuymfa24eBEl5FIHAWL+iZFM4I=";
-  };
+  pythonPackages = python3.pkgs;
+  finalAttrs = {
+    pname = "pyp";
+    version = "1.2.0";
+
+    src = fetchFromGitHub {
+      owner = "hauntsaninja";
+      repo = "pyp";
+      rev = "refs/tags/v${finalAttrs.version}";
+      hash = "sha256-hnEgqWOIVj2ugOhd2aS9IulfkVnrlkhwOtrgH4qQqO8=";
+    };
+
+    pyproject = true;
+
+    build-system = with pythonPackages; [
+      flit-core
+    ];
+
+    nativeCheckInputs = (with pythonPackages; [
+      pytestCheckHook
+    ]) ++ [
+      bc
+      jq
+    ];
+
+    pythonImportsCheck = [
+      "pyp"
+    ];
+
+    # without this, the tests fail because they are unable to find the pyp tool
+    # itself...
+    preCheck = ''
+      _OLD_PATH_=$PATH
+      PATH=$out/bin:$PATH
+   '';
+
+    # And a cleanup!
+    postCheck = ''
+      PATH=$_OLD_PATH_
+    '';
 
-  nativeBuildInputs = [
-    python3.pkgs.flit-core
-  ];
-
-  nativeCheckInputs = [
-    python3.pkgs.pytestCheckHook
-    bc
-    jq
-  ];
-
-  # without this, the tests fail because they are unable to find the pyp tool
-  # itself...
-  preCheck = ''
-     _OLD_PATH_=$PATH
-     PATH=$out/bin:$PATH
-  '';
-
-  # And a cleanup
-  postCheck = ''
-    PATH=$_OLD_PATH_
-  '';
-
-  meta = {
-    homepage = "https://github.com/hauntsaninja/pyp";
-    description = "Easily run Python at the shell";
-    changelog = "https://github.com/hauntsaninja/pyp/blob/${version}/CHANGELOG.md";
-    license = lib.licenses.mit;
-    maintainers = with lib.maintainers; [ AndersonTorres ];
+    meta = {
+      homepage = "https://github.com/hauntsaninja/pyp";
+      description = "Easily run Python at the shell";
+      changelog = "https://github.com/hauntsaninja/pyp/blob/${finalAttrs.version}/CHANGELOG.md";
+      license = with lib.licenses; [ mit ];
+      mainProgram = "pyp";
+      maintainers = with lib.maintainers; [ rmcgibbo AndersonTorres ];
+    };
   };
-}
+in
+pythonPackages.buildPythonPackage finalAttrs
diff --git a/pkgs/development/python-modules/pyp/default.nix b/pkgs/development/python-modules/pyp/default.nix
deleted file mode 100644
index 49f4c0a96577..000000000000
--- a/pkgs/development/python-modules/pyp/default.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-{ lib
-, buildPythonPackage
-, fetchFromGitHub
-, pytestCheckHook
-, coreutils
-, pythonOlder
-, astunparse
-, flit-core
-, jq
-, bc
-}:
-
-buildPythonPackage rec {
-  pname = "pyp";
-  version = "1.2.0";
-  format = "pyproject";
-
-  disabled = pythonOlder "3.6";
-
-  src = fetchFromGitHub {
-    owner = "hauntsaninja";
-    repo = pname;
-    rev = "refs/tags/v${version}";
-    hash = "sha256-hnEgqWOIVj2ugOhd2aS9IulfkVnrlkhwOtrgH4qQqO8=";
-  };
-
-  nativeBuildInputs = [
-    flit-core
-  ];
-
-  propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
-    astunparse
-  ];
-
-  preCheck = ''
-    export PATH=$out/bin:$PATH
-  '';
-
-  nativeCheckInputs = [
-    pytestCheckHook
-    coreutils
-    jq
-    bc
-  ];
-
-  pythonImportsCheck = [
-    "pyp"
-  ];
-
-  meta = with lib; {
-    description = "Easily run Python at the shell! Magical, but never mysterious";
-    homepage = "https://github.com/hauntsaninja/pyp";
-    license = licenses.mit;
-    maintainers = with maintainers; [ rmcgibbo ];
-   };
-}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 1e72249ad5db..41856355323d 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -11173,10 +11173,6 @@ self: super: with self; {
 
   pyomo = callPackage ../development/python-modules/pyomo { };
 
-  pyp = callPackage ../development/python-modules/pyp {
-    inherit (pkgs) jq;
-  };
-
   pypng = callPackage ../development/python-modules/pypng { };
 
   phonemizer = callPackage ../development/python-modules/phonemizer { };