Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 versionCheckHook, 6 gitUpdater, 7}: 8 9python3Packages.buildPythonApplication rec { 10 pname = "piston-cli"; 11 version = "1.5.0"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "Shivansh-007"; 16 repo = "piston-cli"; 17 tag = "v${version}"; 18 hash = "sha256-5S+1YGoPMprWnlsTGGPHtlQT974TsFgct3jVPngTT1k="; 19 }; 20 21 build-system = [ 22 python3Packages.poetry-core 23 ]; 24 25 dependencies = with python3Packages; [ 26 appdirs 27 click 28 coloredlogs 29 more-itertools 30 prompt-toolkit 31 rich 32 requests-cache 33 pygments 34 pyyaml 35 more-itertools 36 ]; 37 38 postPatch = '' 39 substituteInPlace pyproject.toml \ 40 --replace-fail 'piston = "piston:main"' 'piston = "piston.cli:cli_app"' 41 ''; 42 43 pythonRelaxDeps = [ 44 "rich" 45 "more-itertools" 46 "PyYAML" 47 "requests-cache" 48 ]; 49 50 nativeCheckInputs = [ versionCheckHook ]; 51 versionCheckProgramArg = "--version"; 52 versionCheckProgram = "${placeholder "out"}/bin/piston"; 53 54 pythonImportsCheck = [ "piston" ]; 55 56 passthru.updateScript = gitUpdater { rev-prefix = "v"; }; 57 58 meta = { 59 description = "Piston api tool"; 60 homepage = "https://github.com/Shivansh-007/piston-cli"; 61 license = lib.licenses.mit; 62 platforms = lib.platforms.unix; 63 maintainers = with lib.maintainers; [ ethancedwards8 ]; 64 mainProgram = "piston"; 65 }; 66}