Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 88 lines 1.7 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, fetchpatch 5, meson 6, libtsm 7, systemd 8, libxkbcommon 9, libdrm 10, libGLU 11, libGL 12, pango 13, pixman 14, pkg-config 15, docbook_xsl 16, libxslt 17, mesa 18, ninja 19, buildPackages 20}: 21 22stdenv.mkDerivation rec { 23 pname = "kmscon"; 24 version = "9.0.0"; 25 26 src = fetchFromGitHub { 27 owner = "Aetf"; 28 repo = "kmscon"; 29 rev = "v${version}"; 30 sha256 = "sha256-8owyyzCrZVbWXcCR+RA+m0MOrdzW+efI+rIMWEVEZ1o="; 31 }; 32 33 strictDeps = true; 34 35 depsBuildBuild = [ 36 buildPackages.stdenv.cc 37 ]; 38 39 buildInputs = [ 40 libGLU 41 libGL 42 libdrm 43 libtsm 44 libxkbcommon 45 pango 46 pixman 47 systemd 48 mesa 49 ]; 50 51 nativeBuildInputs = [ 52 meson 53 ninja 54 docbook_xsl 55 pkg-config 56 libxslt # xsltproc 57 ]; 58 59 patches = [ 60 (fetchpatch { 61 name = "0001-tests-fix-warnings.patch"; 62 url = "https://github.com/Aetf/kmscon/commit/b65f4269b03de580923ab390bde795e7956b633f.patch"; 63 sha256 = "sha256-ngflPwmNMM/2JzhV+hHiH3efQyoSULfqEywzWox9iAQ="; 64 }) 65 ]; 66 67 # _FORTIFY_SOURCE requires compiling with optimization (-O) 68 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-O" 69 + " -Wno-error=maybe-uninitialized"; # https://github.com/Aetf/kmscon/issues/49 70 71 configureFlags = [ 72 "--enable-multi-seat" 73 "--disable-debug" 74 "--enable-optimizations" 75 "--with-renderers=bbulk,gltex,pixman" 76 ]; 77 78 enableParallelBuilding = true; 79 80 meta = with lib; { 81 description = "KMS/DRM based System Console"; 82 mainProgram = "kmscon"; 83 homepage = "https://www.freedesktop.org/wiki/Software/kmscon/"; 84 license = licenses.mit; 85 maintainers = with maintainers; [ omasanori ]; 86 platforms = platforms.linux; 87 }; 88}