diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2021-04-03 13:36:34 +0200 |
---|---|---|
committer | Michael Weiss <dev.primeos@gmail.com> | 2021-04-03 13:36:34 +0200 |
commit | ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4 (patch) | |
tree | 2ce261074fedb39766f1d9cbc3afbf8e8ceefeb3 /pkgs/development/libraries/wayland | |
parent | 6c5934523585bfd2e5c177e78c468cffc282b5da (diff) | |
download | nixpkgs-ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4.tar nixpkgs-ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4.tar.gz nixpkgs-ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4.tar.bz2 nixpkgs-ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4.tar.lz nixpkgs-ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4.tar.xz nixpkgs-ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4.tar.zst nixpkgs-ea099211e0c4dc8163ad6cbda3abddd3e75bf5b4.zip |
wayland: Refactor the Nix expression
This should make it a bit easier to read, expat is not optional (only for cross-compiling - WIP), and fetchpatch is no longer required.
Diffstat (limited to 'pkgs/development/libraries/wayland')
-rw-r--r-- | pkgs/development/libraries/wayland/default.nix | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix index 99800bb2c54..875b6508d6f 100644 --- a/pkgs/development/libraries/wayland/default.nix +++ b/pkgs/development/libraries/wayland/default.nix @@ -1,16 +1,15 @@ { 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) +, expat +, libxml2 , withLibraries ? stdenv.isLinux +, libffi , withDocumentation ? withLibraries && stdenv.hostPlatform == stdenv.buildPlatform , graphviz-nox , doxygen @@ -25,8 +24,6 @@ # Documentation is only built when building libraries. assert withDocumentation -> withLibraries; -# Require the optional to be enabled until upstream fixes or removes the configure flag -assert expat != null; let isCross = stdenv.buildPlatform != stdenv.hostPlatform; in @@ -46,6 +43,10 @@ stdenv.mkDerivation rec { }) ]; + postPatch = lib.optionalString withDocumentation '' + patchShebangs doc/doxygen/gen-doxygen.py + ''; + outputs = [ "out" ] ++ lib.optionals withDocumentation [ "doc" "man" ]; separateDebugInfo = true; @@ -54,10 +55,6 @@ stdenv.mkDerivation rec { "-Ddocumentation=${lib.boolToString withDocumentation}" ]; - postPatch = lib.optionalString withDocumentation '' - patchShebangs doc/doxygen/gen-doxygen.py - ''; - depsBuildBuild = [ pkg-config ]; |