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
qtspim: init at 722 #74999
qtspim: init at 722 #74999
Conversation
|
||
buildInputs = [ qtbase qttools ]; | ||
|
||
# Remove build artefacts from the repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Remove build artefacts from the repo | |
# Remove build artifacts from the repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks!
install -D ../Documentation/qtspim.man $out/usr/share/man/man1/qtspim.1 | ||
gzip -f --best $out/usr/share/man/man1/qtspim.1 | ||
|
||
install -d $out/usr/share/qtspim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these paths should be $out/share/...
(no /usr
prefix). This may affect finding the files at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed!
Finally found what's up with the docs -- doesn't have anything to do with Qt, just a bunch of hardcoded paths in the source code (missed initially them while stracing as qtspim access
ed them, while I expected other syscalls).
601f767
to
2cc7fba
Compare
buildPhase = '' | ||
export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}" | ||
export QT_QPA_PLATFORM_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}/platforms" | ||
make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ttuegel is there a better way to make qhelpgenerator
inside build work than setting these vars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(about "Outdated") moved it to preBuild
, question is still valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(moved it to the buildPhase
again, as preBuild
version sometimes broke down when building with more than 3 --cores
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why setting QT_PLUGIN_PATH
isn't sufficient, and it should be OK to set these in preBuild
, but I don't see anything wrong with this.
da9c842
to
047a586
Compare
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
buildPhase = '' | ||
export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}" | ||
export QT_QPA_PLATFORM_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}/platforms" | ||
make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why setting QT_PLUGIN_PATH
isn't sufficient, and it should be OK to set these in preBuild
, but I don't see anything wrong with this.
|
||
sourceRoot = "code-r${version}/QtSpim"; | ||
|
||
nativeBuildInputs = [ bison flex qmake ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add wrapQtAppsHook
to nativeBuildInputs
.
@aske do you still want to get this in? |
Yes, thank you for pinging.
I’ll resolve conflicts and update PR soonish.
(Not sure when I’ll have time to use the actual program though; added it in order to use while reading tiger book).
… On 3 Dec 2020, at 21:56, Pavol Rusnak ***@***.***> wrote:
@aske do you still want to get this in?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
For 734, it at least worked a month or two ago when I was using it for my Computer Architecture course last semester. commit
Author: Edmund Wu
Date: Sun Nov 22 13:42:27 2020 -0500
qtspim: 722 -> 734
diff --git a/pkgs/applications/virtualization/spim/default.nix b/pkgs/applications/virtualization/spim/default.nix
index 07c94d84d5a..595f1e90789 100644
--- a/pkgs/applications/virtualization/spim/default.nix
+++ b/pkgs/applications/virtualization/spim/default.nix
@@ -1,35 +1,40 @@
-{ mkDerivation, lib, fetchsvn, qmake, qtbase, qttools, bison, flex }:
+{ lib, mkDerivation, fetchsvn
+, flex, bison, qmake, wrapQtAppsHook
+, qtbase, qttools }:
mkDerivation rec {
pname = "QtSpim";
- version = "722";
+ version = "734";
src = fetchsvn {
url = "https://svn.code.sf.net/p/spimsimulator/code";
rev = version;
- sha256 = "1hfz41ra93pdd2pri5hibl63sg9yyk12a8nhdkmgj7h9bwgqxw6b";
+ sha256 = "1c2d30xi9jvxh34pd7m5mzgp14qz0s1726gryc7ny2z6sqdjqsaa";
};
sourceRoot = "code-r${version}/QtSpim";
- nativeBuildInputs = [ bison flex qmake ];
+ nativeBuildInputs = [ flex bison qmake wrapQtAppsHook ];
buildInputs = [ qtbase qttools ];
# Remove build artifacts from the repo
preConfigure = ''
- rm parser_yacc.h
- rm parser_yacc.cpp
- rm scanner_lex.cpp
+ sed -i \
+ -e 's@$(COPY) ''${QMAKE_FILE_PATH}/''${QMAKE_FILE_BASE}.qhc ''${QMAKE_FILE_OUT};@@g' \
+ -e 's@qcollectiongenerator@qhelpgenerator@g' \
+ QtSpim.pro
+
+ sed -i \
+ -e 's/zero_imm/is_zero_imm/g' \
+ -e 's/^int data_dir/bool data_dir/g' \
+ -e 's/^int text_dir/bool text_dir/g' \
+ -e 's/^int parse_error_occurred/bool parse_error_occurred/g' \
+ parser_yacc.cpp
rm help/qtspim.qhc
'';
- # Fix bug in a generated Makefile
- postConfigure = ''
- substituteInPlace Makefile --replace '$(MOVE) help/qtspim.qhc help/qtspim.qhc;' ""
- '';
-
# Fix documentation path
postPatch = ''
substituteInPlace menu.cpp --replace "/usr/lib/qtspim/help/qtspim.qhc" "$out/share/qtspim/help/qtspim.qhc" |
I was also able to get this working with eadwu's patch. Friendly ping to @aske in case you've got the bandwidth to get this in |
rm parser_yacc.h | ||
rm parser_yacc.cpp | ||
rm scanner_lex.cpp | ||
|
||
rm help/qtspim.qhc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm parser_yacc.h | |
rm parser_yacc.cpp | |
rm scanner_lex.cpp | |
rm help/qtspim.qhc | |
rm parser_yacc.h parser_yacc.cpp scanner_lex.cpp help/qtspim.qhc |
substituteInPlace menu.cpp --replace "/usr/lib/qtspim/help/qtspim.qhc" "$out/share/qtspim/help/qtspim.qhc" | ||
substituteInPlace menu.cpp --replace "/usr/lib/qtspim/bin/assistant" "${qttools.dev}/bin/assistant" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
substituteInPlace menu.cpp --replace "/usr/lib/qtspim/help/qtspim.qhc" "$out/share/qtspim/help/qtspim.qhc" | |
substituteInPlace menu.cpp --replace "/usr/lib/qtspim/bin/assistant" "${qttools.dev}/bin/assistant" | |
substituteInPlace menu.cpp \ | |
--replace "/usr/lib/qtspim/help/qtspim.qhc" "$out/share/qtspim/help/qtspim.qhc" \ | |
--replace "/usr/lib/qtspim/bin/assistant" "${qttools.dev}/bin/assistant" |
I marked this as stale due to inactivity. → More info |
superseded by #131325 |
Motivation for this change
Add a MIPS32 simulator.
To build a documentation I've needed to set
QT_QPA_PLATFORM_PATH
andQT_PLUGIN_PATH
becauseqhelpgenerator
failed with:Either way after installation I did not manage to make
qtspim
find its help file, so I added a patch disabling doc building to save some build time.@ttuegel maybe you have ideas on what's going on?
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @