at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 packaging, 11 12 # tests 13 addBinToPathHook, 14 gitMinimal, 15 pytestCheckHook, 16 writableTmpDirAsHomeHook, 17}: 18 19buildPythonPackage rec { 20 pname = "dunamai"; 21 version = "1.25.0"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "mtkennerly"; 26 repo = "dunamai"; 27 tag = "v${version}"; 28 hash = "sha256-kPOEhJwsSzGea7fS5y5tbAvzZZ+OxIyjpYpS6i++rHE="; 29 }; 30 31 build-system = [ poetry-core ]; 32 33 dependencies = [ packaging ]; 34 35 preCheck = '' 36 git config --global user.email "nobody@example.com" 37 git config --global user.name "Nobody" 38 ''; 39 40 nativeCheckInputs = [ 41 addBinToPathHook 42 gitMinimal 43 pytestCheckHook 44 writableTmpDirAsHomeHook 45 ]; 46 47 disabledTests = [ 48 # clones from github.com 49 "test__version__from_git__shallow" 50 ]; 51 52 pythonImportsCheck = [ "dunamai" ]; 53 54 meta = { 55 description = "Dynamic version generation"; 56 mainProgram = "dunamai"; 57 homepage = "https://github.com/mtkennerly/dunamai"; 58 changelog = "https://github.com/mtkennerly/dunamai/blob/${src.tag}/CHANGELOG.md"; 59 license = lib.licenses.mit; 60 maintainers = with lib.maintainers; [ jmgilman ]; 61 }; 62}