2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchpatch2,
|
2024-06-05 15:53:02 +00:00
|
|
|
buildPythonPackage,
|
|
|
|
setuptools,
|
|
|
|
pythonOlder,
|
|
|
|
# Python deps
|
|
|
|
uplc,
|
|
|
|
graphlib-backport,
|
|
|
|
ordered-set,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pluthon";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.5.3";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OpShin";
|
|
|
|
repo = "pluthon";
|
|
|
|
rev = version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-pX/XPZJQZaSY06nLLEvhf+1LEqYG3CdgPV/3Q6XOzTs=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
name = "pluthon-bump-uplc.patch";
|
|
|
|
# https://github.com/OpShin/pluthon/pull/21
|
|
|
|
url = "https://github.com/OpShin/pluthon/commit/4b0a40223f253643056cab12231264c5beffc666.patch?full_index=1";
|
|
|
|
hash = "sha256-dO9JaIpkugZFKsr3Hd0cFCy7K+cmf77UfrdkZ+sGQtA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
uplc
|
|
|
|
ordered-set
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ lib.optional (pythonOlder "3.9") graphlib-backport;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|