Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonApplication 3, fetchFromGitea 4, pythonImportsCheckHook 5, sphinxHook 6, sphinx-rtd-theme 7}: 8 9buildPythonApplication rec { 10 pname = "cdist"; 11 version = "7.0.0"; 12 outputs = [ "out" "man" "doc" ]; 13 14 src = fetchFromGitea { 15 domain = "code.ungleich.ch"; 16 owner = "ungleich-public"; 17 repo = "cdist"; 18 rev = version; 19 hash = "sha256-lIx0RtGQJdY2e00azI9yS6TV+5pCegpKOOD0dQmgMqA="; 20 }; 21 22 nativeBuildInputs = [ 23 pythonImportsCheckHook 24 sphinxHook 25 sphinx-rtd-theme 26 ]; 27 28 sphinxRoot = "docs/src"; 29 30 # "make man" creates symlinks in docs/src needed by sphinxHook. 31 postPatch = '' 32 echo "VERSION = '$version'" > cdist/version.py 33 34 make man 35 ''; 36 37 preConfigure = '' 38 export HOME=/tmp 39 ''; 40 41 # Test suite requires either non-chrooted environment or root. 42 # 43 # When "machine_type" explorer figures out that it is running inside 44 # chroot, it assumes that it has enough privileges to escape it. 45 doCheck = false; 46 47 pythonImportsCheck = [ "cdist" ]; 48 49 postInstall = '' 50 mkdir -p $out/share 51 mv docs/dist/man $out/share 52 ''; 53 54 meta = with lib; { 55 description = "Minimalistic configuration management system"; 56 homepage = "https://www.sdi.st"; 57 changelog = "https://code.ungleich.ch/ungleich-public/cdist/src/tag/${version}/docs/changelog"; 58 59 # Mostly. There are still couple types that are gpl3-only. 60 license = licenses.gpl3Plus; 61 maintainers = with maintainers; [ kaction ]; 62 platforms = platforms.unix; 63 }; 64}