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

Add Mindforger-1.48 #50851

Merged
merged 1 commit into from
Nov 22, 2018
Merged

Add Mindforger-1.48 #50851

merged 1 commit into from
Nov 22, 2018

Conversation

s9gf4ult
Copy link
Contributor

@s9gf4ult s9gf4ult commented Nov 20, 2018

Add another package for nixpkgs users
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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

version = "1.48.2";

src = fetchurl {
url = "https://github.com/dvorka/mindforger/releases/download/1.48.0/mindforger_${version}.tgz";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks weird, but it's not your fault. Upstream has a creative use of tags >;<


doCheck = true;

patches = [ ./build.patch ] ;
Copy link
Contributor

@c0bw3b c0bw3b Nov 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should submit that patch upstream too.
Also I think you could do the same thing with substituteInPlace file.pro --replace "/usr" $out from your default.nix (saves storing a patch along with it) ? I'll test locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch is little bit more complex, than just replacement of /usr то $out AFAIR

Copy link
Contributor

@c0bw3b c0bw3b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello and thank you for the contribution to nixos/nixpkgs.

I left some comments for you to consider.
Also, please squash all your commits into one and write a commit message according to our guidelines:
https://nixos.org/nixpkgs/manual/#submitting-changes-making-patches

( here it should be mindforger: init at 1.48.2 )

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 20, 2018

I get this trying to build on nixos-18.09 with sandboxing:

/build/mindforger_1.48.2/deps/discount /build/mindforger_1.48.2
configure requires a functional version of tr
./configure.sh: ./configure.inc: line 107: 5: Bad file descriptor

with tr 8.29 being part of my build env

@s9gf4ult
Copy link
Contributor Author

I have coreutils-8.30 in nixpkgs and it builds.

AC_TR=`acLookFor tr` 
if [ "$AC_TR" ]; then 
    # try posix-style tr 
    ABC=`echo abc | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` 
    if [ "$ABC" = "ABC" ]; then 
        AC_UPPERCASE="$AC_TR abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
        AC_UPPER_PAT="ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
    else 
        ABC=`echo abc | tr a-z A-Z` 
        if [ "$ABC" = "ABC" ]; then 
            AC_UPPERCASE="$AC_TR a-z A-Z" 
            AC_UPPER_PAT="A-Z" 
        else 
            ABC=`echo abc | tr '[a-z]' '[A-Z]'` 
            if [ "$ABC" = "ABC" ]; then 
                AC_UPPERCASE="$AC_TR '[a-z]' '[A-Z]'" 
                AC_UPPER_PAT="'[A-Z]'" 
            else 
                AC_FAIL "$AC_TR cannot translate lowercase to uppercase" 
                return 0 
            fi 
        fi 
    fi 
else 
    AC_FAIL "configure requires a functional version of tr" 
fi 

Here is a script. Looks like it can not find working tr in an environment. Do I need to add coreutils as explicit dependency? Is standard environment in NixOS differs?

@dtzWill
Copy link
Member

dtzWill commented Nov 20, 2018

This fixes the tr issue and the one I ran into after that:
dtzWill@833b82b

@dtzWill
Copy link
Member

dtzWill commented Nov 20, 2018

Is ccache needed for the build, or useful for non-sandbox building? If the latter then it should be removed before merging.

Also, I think this should have enableParallelBuilding = true; in it-- unless the choice to not do so was intentional? Helps it not take forever 😁

@dtzWill
Copy link
Member

dtzWill commented Nov 20, 2018

Hmm, the .desktop needs to be fixed: it references /usr/bin/mindforger apparently.

(Thank you!! Not your fault all these things need addressing haha :3)

@s9gf4ult
Copy link
Contributor Author

@dtzWill Thanks! How .desktop can be fixed?

@s9gf4ult
Copy link
Contributor Author

And using ccache is definitely not needed here.

@@ -14,6 +14,8 @@ stdenv.mkDerivation rec {

doCheck = true;

enableParallelBuilding = true ;
Copy link
Contributor

@c0bw3b c0bw3b Nov 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: no harm in making it explicit.
But with cmake, meson and qmake this is actually the default. See https://nixos.org/nixpkgs/manual/#ssec-stdenv-attributes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I missed that! Good to know for sure, thanks!

@dtzWill
Copy link
Member

dtzWill commented Nov 20, 2018

@dtzWill Thanks! How .desktop can be fixed?

Something like:

substituteInPlace path-to-it.desktop --replace /usr "$out"

Maybe?

I would expect it's just hard-coded so it can be done during postPatch -- which is nice to see if it's fixed without needing to build first :D.

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 20, 2018

in postPatch or in postInstall directly on the installed desktop file

@s9gf4ult
Copy link
Contributor Author

Where can I see how to call substituteInPlace ?

@s9gf4ult
Copy link
Contributor Author

Not for this particular case, but in general

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 20, 2018

I guess https://nixos.org/nixpkgs/manual/#ssec-stdenv-functions is the best source

@s9gf4ult
Copy link
Contributor Author

Ok thanks.

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 20, 2018

@GrahamcOfBorg build mindforger

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: mindforger

Partial log (click to expand)

Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[2]: *** [Source/WebCore/CMakeFiles/WebCore.dir/build.make:12375: Source/WebCore/CMakeFiles/WebCore.dir/css/CSSAllInOne.cpp.o] Error 4
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:783: Source/WebCore/CMakeFiles/WebCore.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
builder for '/nix/store/q3q603mwkl7wfwfkfb18zpg1hd0bsyk3-qtwebkit-5.212-alpha-01-26-2018.drv' failed with exit code 2
cannot build derivation '/nix/store/imaa3s0g08asn074yrajz84bs4gwllhk-mindforger-1.48.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/imaa3s0g08asn074yrajz84bs4gwllhk-mindforger-1.48.2.drv' failed

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: mindforger

Partial log (click to expand)

[ 19%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/jit/TempRegisterSet.cpp.o
[ 19%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/jit/ThunkGenerators.cpp.o
[ 19%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/llint/LLIntCLoop.cpp.o
[ 19%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/llint/LLIntData.cpp.o
[ 19%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/llint/LLIntEntrypoint.cpp.o
[ 19%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/llint/LLIntExceptions.cpp.o
[ 19%] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/llint/LLIntSlowPaths.cpp.o
building of '/nix/store/1242dn82d4p5ww7jn7w6ha6ylq4lvxxf-qtwebkit-5.212-alpha-01-26-2018.drv' timed out after 1800 seconds
cannot build derivation '/nix/store/s1b2syxp8aqqcl64f116v4yscpaf3sji-mindforger-1.48.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/s1b2syxp8aqqcl64f116v4yscpaf3sji-mindforger-1.48.2.drv' failed

@s9gf4ult
Copy link
Contributor Author

Looks like binary cache not ready yet

@s9gf4ult
Copy link
Contributor Author

Failure on aarch64-linux

I think it is not supported in upstream. Can I limit architectures to build this package on?

Verified

This commit was signed with the committer’s verified signature.
janb87 Jan Bevers
@s9gf4ult
Copy link
Contributor Author

@GrahamcOfBorg build mindforger

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 22, 2018

(only trusted users can invoke the bot :) )
The previous aarch64 failure was not with mindforger but with qtwebkit it seems.. which is supposed to be multi-arch. Let's retry once, then we'll decide whether to restrict supported platforms.

@GrahamcOfBorg build mindforger

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mindforger

Partial log (click to expand)

shrinking /nix/store/72z1w4q6nmsjilsazpczj8xzlb7nw5w6-mindforger-1.48.2/bin/mindforger
gzipping man pages under /nix/store/72z1w4q6nmsjilsazpczj8xzlb7nw5w6-mindforger-1.48.2/share/man/
strip is /nix/store/rpbg8gmqxhz8g61p1plz5d2srs84pvmv-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/72z1w4q6nmsjilsazpczj8xzlb7nw5w6-mindforger-1.48.2/lib  /nix/store/72z1w4q6nmsjilsazpczj8xzlb7nw5w6-mindforger-1.48.2/bin
patching script interpreter paths in /nix/store/72z1w4q6nmsjilsazpczj8xzlb7nw5w6-mindforger-1.48.2
checking for references to /build in /nix/store/72z1w4q6nmsjilsazpczj8xzlb7nw5w6-mindforger-1.48.2...
postPatchMkspecs
postPatchMkspecs
postPatchMkspecs
/nix/store/72z1w4q6nmsjilsazpczj8xzlb7nw5w6-mindforger-1.48.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mindforger

Partial log (click to expand)

shrinking /nix/store/cqp878bdndzvpphl0qqkfr2h2m75b6y5-mindforger-1.48.2/bin/mindforger
gzipping man pages under /nix/store/cqp878bdndzvpphl0qqkfr2h2m75b6y5-mindforger-1.48.2/share/man/
strip is /nix/store/6dpnd5aniypn8124mmy8f88s4mq2zl07-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/cqp878bdndzvpphl0qqkfr2h2m75b6y5-mindforger-1.48.2/lib  /nix/store/cqp878bdndzvpphl0qqkfr2h2m75b6y5-mindforger-1.48.2/bin
patching script interpreter paths in /nix/store/cqp878bdndzvpphl0qqkfr2h2m75b6y5-mindforger-1.48.2
checking for references to /build in /nix/store/cqp878bdndzvpphl0qqkfr2h2m75b6y5-mindforger-1.48.2...
postPatchMkspecs
postPatchMkspecs
postPatchMkspecs
/nix/store/cqp878bdndzvpphl0qqkfr2h2m75b6y5-mindforger-1.48.2

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 22, 2018

Well now this is ready. :)
@s9gf4ult thank you for the contribution to nixpkgs

@c0bw3b c0bw3b merged commit 9467621 into NixOS:master Nov 22, 2018
@s9gf4ult
Copy link
Contributor Author

Cool!

@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants