nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 59 lines 1.2 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 6 # tests 7 addBinToPathHook, 8 bc, 9 jq, 10 versionCheckHook, 11}: 12 13let 14 finalAttrs = { 15 pname = "pyp"; 16 version = "1.3.0"; 17 18 src = fetchFromGitHub { 19 owner = "hauntsaninja"; 20 repo = "pyp"; 21 tag = "v${finalAttrs.version}"; 22 hash = "sha256-u9yxjYNQrtYtFtUh5tTJ1mGmGB+Ry+FRupli8RzRu3c="; 23 }; 24 25 pyproject = true; 26 27 build-system = with python3Packages; [ 28 flit-core 29 ]; 30 31 nativeCheckInputs = 32 (with python3Packages; [ 33 pytestCheckHook 34 ]) 35 ++ [ 36 addBinToPathHook 37 bc 38 jq 39 versionCheckHook 40 ]; 41 versionCheckProgramArg = "--version"; 42 43 pythonImportsCheck = [ 44 "pyp" 45 ]; 46 47 meta = { 48 homepage = "https://github.com/hauntsaninja/pyp"; 49 description = "Easily run Python at the shell"; 50 changelog = "https://github.com/hauntsaninja/pyp/blob/${finalAttrs.version}/CHANGELOG.md"; 51 license = with lib.licenses; [ mit ]; 52 mainProgram = "pyp"; 53 maintainers = with lib.maintainers; [ 54 rmcgibbo 55 ]; 56 }; 57 }; 58in 59python3Packages.buildPythonPackage finalAttrs