Files
nixpkgs/pkgs/by-name/pi/piston-cli/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

67 lines
1.3 KiB
Nix

{
lib,
python3Packages,
fetchFromGitHub,
versionCheckHook,
gitUpdater,
}:
python3Packages.buildPythonApplication rec {
pname = "piston-cli";
version = "1.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Shivansh-007";
repo = "piston-cli";
tag = "v${version}";
hash = "sha256-5S+1YGoPMprWnlsTGGPHtlQT974TsFgct3jVPngTT1k=";
};
build-system = [
python3Packages.poetry-core
];
dependencies = with python3Packages; [
appdirs
click
coloredlogs
more-itertools
prompt-toolkit
rich
requests-cache
pygments
pyyaml
more-itertools
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'piston = "piston:main"' 'piston = "piston.cli:cli_app"'
'';
pythonRelaxDeps = [
"rich"
"more-itertools"
"PyYAML"
"requests-cache"
];
nativeCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
versionCheckProgram = "${placeholder "out"}/bin/piston";
pythonImportsCheck = [ "piston" ];
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
description = "Piston api tool";
homepage = "https://github.com/Shivansh-007/piston-cli";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ethancedwards8 ];
mainProgram = "piston";
};
}