Unverified Commit 8e90afb6 authored by Jon Seager's avatar Jon Seager Committed by GitHub
Browse files

Merge pull request #291245 from t4ccer/t4/opshin/init

parents 64eb8fcf b4015067
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "opshin";
  version = "0.20.0";

  format = "pyproject";

  src = fetchFromGitHub {
    owner = "OpShin";
    repo = "opshin";
    rev = version;
    hash = "sha256-fJlPeVAuEf80FVxdXnaKASLmjMEgz6ysXenUY72+sos=";
  };

  propagatedBuildInputs = with python3.pkgs; [
    setuptools
    poetry-core
    uplc
    pluthon
    pycardano
    frozenlist2
    astunparse
    ordered-set
  ];

  meta = with lib; {
    description = "A simple pythonic programming language for Smart Contracts on Cardano";
    homepage = "https://opshin.dev";
    license = licenses.mit;
    maintainers = with maintainers; [ t4ccer ];
    mainProgram = "opshin";
  };
}
+32 −0
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, buildPythonPackage
, setuptools
}:

buildPythonPackage rec {
  pname = "frozenlist2";
  version = "1.0.0";

  format = "pyproject";

  src = fetchFromGitHub {
    owner = "rohanpm";
    repo = "frozenlist2";
    rev = "v${version}";
    hash = "sha256-fF0oFZ2q1wRH7IKBlCjm3Za4xtEMSHyEaGL09rHgtTY=";
  };

  propagatedBuildInputs = [
    setuptools
  ];

  pythonImportsCheck = [ "frozenlist2" ];

  meta = with lib; {
    description = "An immutable list for Python";
    homepage = "https://github.com/rohanpm/frozenlist2";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ t4ccer ];
  };
}
+40 −0
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, buildPythonPackage
, setuptools
, poetry-core
}:

buildPythonPackage rec {
  pname = "graphlib-backport";
  version = "1.1.0";

  format = "pyproject";

  src = fetchFromGitHub {
    owner = "mariushelf";
    repo = "graphlib_backport";
    rev = version;
    hash = "sha256-ssJLtBQH8sSnccgcAKLKfYpPyw5U0RIm1F66/Er81lo=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml        \
      --replace 'poetry>=1.0' 'poetry-core' \
      --replace 'poetry.masonry.api' 'poetry.core.masonry.api'
  '';

  propagatedBuildInputs = [
    setuptools
    poetry-core
  ];

  pythonImportsCheck = [ "graphlib" ];

  meta = with lib; {
    description = "Backport of the Python 3.9 graphlib module for Python 3.6+";
    homepage = "https://github.com/mariushelf/graphlib_backport";
    license = licenses.psfl;
    maintainers = with maintainers; [ t4ccer ];
  };
}
+39 −0
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, buildPythonPackage
, setuptools
, pythonOlder
# Python deps
, uplc
, graphlib-backport
, ordered-set
}:

buildPythonPackage rec {
  pname = "pluthon";
  version = "0.4.6";

  format = "pyproject";

  src = fetchFromGitHub {
    owner = "OpShin";
    repo = "pluthon";
    rev = version;
    hash = "sha256-ZmBkbglSbBfVhA4yP0tJdwpJiFpJ7vX0A321ldQF0lA=";
  };

  propagatedBuildInputs = [
    setuptools
    uplc
    ordered-set
  ] ++ lib.optionals (pythonOlder "3.9") graphlib-backport;

  pythonImportsCheck = [ "pluthon" ];

  meta = with lib; {
    description = "Pluto-like programming language for Cardano Smart Contracts in Python";
    homepage = "https://github.com/OpShin/pluthon";
    license = licenses.mit;
    maintainers = with maintainers; [ t4ccer ];
  };
}
+7 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonRelaxDepsHook
# Python deps
, blockfrost-python
, cachetools
@@ -41,6 +42,10 @@ in buildPythonPackage rec {
    hash = "sha256-LP/W8IC2del476fGFq10VMWwMrbAoCCcZOngA8unBM0=";
  };

  nativeBuildInputs = [
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = [
    blockfrost-python
    cachetools
@@ -58,6 +63,8 @@ in buildPythonPackage rec {
    websocket-client
  ];

  pythonRelaxDeps = [ "typeguard" ];

  pythonImportsCheck = [ "pycardano" ];

  meta = with lib; {
Loading