Skip to content

Commit

Permalink
nix : fix build when default depends on doc target
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslepoix committed Sep 30, 2024
1 parent 5b737da commit e59a4ea
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ assert lib.asserts.assertMsg (! (stdenv.hostPlatform.isWindows && withGui == fal
"Minimal mode is not compatible with Windows build";

stdenv.mkDerivation {
pname = "qucsrflayout" + lib.strings.optionalString (! withGui) "-minimal";
pname = "qucsrflayout" + lib.strings.optionalString (!withGui) "-minimal";
version =
let
firstLine = builtins.elemAt (lib.strings.split "\n" (builtins.readFile ./CHANGELOG)) 0;
Expand All @@ -36,7 +36,7 @@ stdenv.mkDerivation {
];
};

cmakeFlags = lib.optionals (! withGui) [
cmakeFlags = lib.optionals (!withGui) [
"-DQRFL_MINIMAL=ON"
];

Expand All @@ -55,7 +55,12 @@ stdenv.mkDerivation {
qtbase
];

postBuild = lib.optionals withDoc ''
# Default target depends on doc when QRFL_MINIMAL=OFF
preBuild = lib.optionals (withDoc && withGui) ''
export XDG_CACHE_HOME=$TMPDIR
'';

postBuild = lib.optionals (withDoc && !withGui) ''
export XDG_CACHE_HOME=$TMPDIR
make doc
'';
Expand Down

0 comments on commit e59a4ea

Please sign in to comment.