Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, substituteAll 3, fetchFromGitHub 4, pkg-config 5, meson 6, ninja 7, gobject-introspection 8, python3 9, libyaml 10, rpm 11, file 12, gtk-doc 13, docbook-xsl-nons 14, docbook_xml_dtd_412 15, glib 16}: 17 18stdenv.mkDerivation rec { 19 pname = "libmodulemd"; 20 version = "2.15.0"; 21 22 outputs = [ "bin" "out" "dev" "devdoc" "man" "py" ]; 23 24 src = fetchFromGitHub { 25 owner = "fedora-modularity"; 26 repo = pname; 27 rev = "${pname}-${version}"; 28 sha256 = "sha256-mIyrdksyEk1AKV+vw4g8LUwlQRzwwMkPDuCbw2IiNcA="; 29 }; 30 31 patches = [ 32 # Use proper glib devdoc path. 33 (substituteAll { 34 src = ./glib-devdoc.patch; 35 glib_devdoc = glib.devdoc; 36 }) 37 ]; 38 39 nativeBuildInputs = [ 40 pkg-config 41 meson 42 ninja 43 gtk-doc 44 docbook-xsl-nons 45 docbook_xml_dtd_412 46 gobject-introspection 47 ]; 48 49 buildInputs = [ 50 libyaml 51 rpm 52 file # for libmagic 53 glib 54 ]; 55 56 mesonFlags = [ 57 "-Dgobject_overrides_dir_py3=${placeholder "py"}/${python3.sitePackages}/gi/overrides" 58 ]; 59 60 postFixup = '' 61 # Python overrides depend our own typelibs and other packages 62 mkdir -p "$py/nix-support" 63 echo "$out ${python3.pkgs.pygobject3} ${python3.pkgs.six}" > "$py/nix-support/propagated-build-inputs" 64 ''; 65 66 meta = with lib; { 67 description = "C Library for manipulating module metadata files"; 68 homepage = "https://github.com/fedora-modularity/libmodulemd"; 69 license = licenses.mit; 70 maintainers = with maintainers; [ ]; 71 platforms = platforms.linux ++ platforms.darwin ; 72 }; 73}