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