Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsForQt5.fcitx-qt5: fix build #65571

Merged
merged 2 commits into from Jul 30, 2019
Merged

Conversation

jonringer
Copy link
Contributor

@jonringer jonringer commented Jul 29, 2019

Motivation for this change

While reviewing another PR, found this was broken due to output path error.

libpinyin was the original derivation that was failing due to the fcitx-qt5 error, I cleaned up an "unused substitutation". Verified the cmake file wasn't making any reference to a fcitx storepath.

EDIT:
Resolves #65547

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@worldofpeace
Copy link
Contributor

Can you make libsForQt5.fcitx-qt5 use mkDerivaiton instead of stdenv.mkDerivation?

With that this change should be good to merge.

@jonringer
Copy link
Contributor Author

@GrahamcOfBorg build libsForQt5.fcitx-qt5 fcitx-engines.libpinyin

@worldofpeace worldofpeace requested a review from teto July 30, 2019 01:49
@teto
Copy link
Member

teto commented Jul 30, 2019

did you see my comment #65547 (comment), setting qmakeFlags+=" PLUGINDIR=$out/$qtPluginPrefix" can replace

substituteInPlace platforminputcontext/cmake_install.cmake \
     --replace ${qtbase.out} $out

in my short experiment and looks cleaner than a substitute. Maybe qt5.mkDerivation should set it as well.

@jonringer
Copy link
Contributor Author

in all honesty, i didn't. I made the PR before I saw the issue.

@worldofpeace
Copy link
Contributor

I've actually iterated off variants of what you've suggested @teto and that didn't actually fix it.
I'd prefer an actual patch for this, but I think this should be fine since it's consistent with what's done in other packages like this.

@teto teto merged commit 9db41c1 into NixOS:master Jul 30, 2019
@teto
Copy link
Member

teto commented Jul 30, 2019

thanks for the fix, I am quite busy now so I just merged it, I will try to push my small fix (first making sure it's a fix xD) later on.

aske pushed a commit to aske/nixpkgs that referenced this pull request Aug 4, 2019
@Lucus16
Copy link
Contributor

Lucus16 commented Aug 5, 2019

This build doesn't seem fixed for me, it still fails. When both .out and .bin are substituted it works fine though.

@worldofpeace
Copy link
Contributor

This build doesn't seem fixed for me, it still fails. When both .out and .bin are substituted it works fine though.

I've checked this PR out again locally and the build succeeds for me with
nix-build -A libsForQt5.fcitx-qt5 --check.

But on 525eaf407d4 it does appear broken again,
and that's pretty weird.

Adding another substitution did the trick though

diff --git a/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix b/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix
index ad5b4669498..697c02ee6ab 100644
--- a/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix
+++ b/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix
@@ -23,7 +23,8 @@ mkDerivation rec {
 
   preInstall = ''
     substituteInPlace platforminputcontext/cmake_install.cmake \
-      --replace ${qtbase.bin} $out
+      --replace ${qtbase.bin} $out \
+      --replace ${qtbase.out} $out
     substituteInPlace quickphrase-editor/cmake_install.cmake \
       --replace ${fcitx} $out
   '';

I'd say it would be best if @teto corrects this or apply the above diff.

@jonringer jonringer deleted the fix-fcitx-libpinyin branch December 1, 2019 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fcitx-qt5 fails to build on unstable
4 participants