diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-28 14:39:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-10 08:52:36 +0000 |
commit | 693e64ef7421374338ddb1dc12b9573feec75972 (patch) | |
tree | 2526ac075d248699c35d63e04499890ee4381f5f /nixpkgs/pkgs/development/libraries/wayland | |
parent | 7014df2256694d97093d6f2bb1db340d346dea88 (diff) | |
parent | 8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17 (diff) | |
download | nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.gz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.bz2 nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.lz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.xz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.zst nixlib-693e64ef7421374338ddb1dc12b9573feec75972.zip |
Merge commit '8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/wayland')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/wayland/default.nix | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/development/libraries/wayland/default.nix b/nixpkgs/pkgs/development/libraries/wayland/default.nix index fb7d1972c024..07671ddebddc 100644 --- a/nixpkgs/pkgs/development/libraries/wayland/default.nix +++ b/nixpkgs/pkgs/development/libraries/wayland/default.nix @@ -1,16 +1,16 @@ { lib , stdenv , fetchurl -, fetchpatch +, substituteAll , meson , pkg-config -, substituteAll , ninja -, libffi -, libxml2 , wayland -, expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0) -, withDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform +, expat +, libxml2 +, withLibraries ? stdenv.isLinux +, libffi +, withDocumentation ? withLibraries && stdenv.hostPlatform == stdenv.buildPlatform , graphviz-nox , doxygen , libxslt @@ -21,8 +21,9 @@ , docbook_xml_dtd_42 }: -# Require the optional to be enabled until upstream fixes or removes the configure flag -assert expat != null; +# Documentation is only built when building libraries. +assert withDocumentation -> withLibraries; + let isCross = stdenv.buildPlatform != stdenv.hostPlatform; in @@ -42,15 +43,18 @@ stdenv.mkDerivation rec { }) ]; - outputs = [ "out" ] ++ lib.optionals withDocumentation [ "doc" "man" ]; - separateDebugInfo = true; - - mesonFlags = [ "-Ddocumentation=${lib.boolToString withDocumentation}" ]; - postPatch = lib.optionalString withDocumentation '' patchShebangs doc/doxygen/gen-doxygen.py ''; + outputs = [ "out" "bin" "dev" ] ++ lib.optionals withDocumentation [ "doc" "man" ]; + separateDebugInfo = true; + + mesonFlags = [ + "-Dlibraries=${lib.boolToString withLibraries}" + "-Ddocumentation=${lib.boolToString withDocumentation}" + ]; + depsBuildBuild = [ pkg-config ]; @@ -71,16 +75,17 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - libffi expat libxml2 + ] ++ lib.optionals withLibraries [ + libffi ] ++ lib.optionals withDocumentation [ docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 ]; - meta = { + meta = with lib; { description = "Core Wayland window system code and protocol"; longDescription = '' Wayland is a project to define a protocol for a compositor to talk to its @@ -91,9 +96,9 @@ stdenv.mkDerivation rec { rendering). ''; homepage = "https://wayland.freedesktop.org/"; - license = lib.licenses.mit; # Expat version - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ primeos codyopel ]; + license = licenses.mit; # Expat version + platforms = if withLibraries then platforms.linux else platforms.unix; + maintainers = with maintainers; [ primeos codyopel qyliss ]; }; passthru.version = version; |