about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/uplc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/uplc/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/uplc/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/uplc/default.nix b/nixpkgs/pkgs/development/python-modules/uplc/default.nix
new file mode 100644
index 000000000000..a3aa8d10e7ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/uplc/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, fetchFromGitHub
+, buildPythonPackage
+, pythonRelaxDepsHook
+# Python deps
+, frozenlist2
+, python-secp256k1-cardano
+, setuptools
+, poetry-core
+, frozendict
+, cbor2
+, rply
+, pycardano
+}:
+
+buildPythonPackage rec {
+  pname = "uplc";
+  version = "0.6.9";
+
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "OpShin";
+    repo = "uplc";
+    rev = version;
+    hash = "sha256-djJMNXijMVzMVzw8NZSe3YFRGyAPqdvr0P374Za5XkU=";
+  };
+
+  nativeBuildInputs = [
+    pythonRelaxDepsHook
+  ];
+
+  propagatedBuildInputs = [
+    setuptools
+    poetry-core
+    frozendict
+    cbor2
+    frozenlist2
+    rply
+    pycardano
+    python-secp256k1-cardano
+  ];
+
+  pythonRelaxDeps = [ "pycardano" "rply" ];
+
+  pythonImportsCheck = [ "uplc" ];
+
+  meta = with lib; {
+    description = "Python implementation of untyped plutus language core";
+    homepage = "https://opshin.dev";
+    license = licenses.mit;
+    maintainers = with maintainers; [ t4ccer ];
+    mainProgram = "opshin";
+  };
+}