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

routino: init at 3.2 #29755

Merged
merged 2 commits into from Sep 28, 2017
Merged

routino: init at 3.2 #29755

merged 2 commits into from Sep 28, 2017

Conversation

dotlambda
Copy link
Member

Motivation for this change

I need this for QMapShack, which I want to package next.

Even though the installation instructions talk about setting up a web interface, I have no use for this and I even don't know how to package that properly. Therefore I just didn't care about it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

{ stdenv, fetchsvn, perl, zlib, bzip2 }:

stdenv.mkDerivation rec {
name = "Routino-${version}";
Copy link
Member

@vyp vyp Sep 24, 2017

Choose a reason for hiding this comment

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

Lowercase routino? (Possible typo?) If not sorry for the noise.

Copy link
Contributor

Choose a reason for hiding this comment

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

https://nixos.org/nixpkgs/manual/#sec-package-naming :

Don’t use uppercase letters in the name attribute — e.g., "mplayer-1.0rc2" instead of "MPlayer-1.0rc2".

@dotlambda
Copy link
Member Author

dotlambda commented Sep 25, 2017

Do you think it should be uppercase everywhere, even in all-packages.nix?
Or do you wonder why I made it uppercase in the name?

@vyp
Copy link
Member

vyp commented Sep 25, 2017

Just the latter, sorry I wasn't clear.

@dotlambda
Copy link
Member Author

I did this because they write Routino in their documentation:

With Routino the tagging rules are contained in a configuration file

@dotlambda
Copy link
Member Author

You can merge this now

@dotlambda
Copy link
Member Author

ping

@vyp
Copy link
Member

vyp commented Sep 28, 2017

(I can't merge btw, no commit rights.)

version = "3.2";

src = fetchsvn {
url = "http://routino.org/svn/trunk/";
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, that's more elegant.

make DESTDIR="$out" install
mv $out/usr/local/* $out
rmdir $out/usr/local $out/usr
'';
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace this with makeFlags = [ "prefix=$out" ];.

Copy link
Member Author

Choose a reason for hiding this comment

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

I could indeed do installFlags = [ "DESTDIR=$out" ];.
But nevertheless, the install target creates a directory $out/usr/local from which I can move the content to $out in the postInstall phase.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm just remebering that this doesn't work either:
I intentionally wrote make DESTDIR="$out" install since if I don't quote the variable, the package is installed to a directory called ut/.
I tried every way of escaping/quoting I was able to come up with:

  • installFlags = [ ''DESTDIR="$out"'' ]
  • installFlags = [ "DESTDIR=\$out" ]
  • ...

but the package is always installed to ut/.
Do you have an idea?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, that /usr/local comes from the default prefix in the Makefile. If you define it with makeFlags = [ "prefix=$out" ];, you will not have to override DESTDIR.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're absolutely right, but makeFlags = [ "prefix=$out" ]; won't work.
For some strange reason, you need "prefix=$(out)".

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, prefix indeed is not overridable with a make flag. I would try substituteInPlace Makefile.conf --replace prefix=/usr/local prefix=$outin the postPatch phase.

@orivej
Copy link
Contributor

orivej commented Sep 28, 2017

Install phase prints this, but exits with code 0. Is this OK?

create-icons.pl
Can't locate Graphics/Magick.pm in @INC (you may need to install the Graphics::Magick module) (@INC contains: /nix/store/yj4b630bm6yscdw8j2sa1sb61j3rdqsy-perl-5.24.2/lib/perl5/site_perl/5.24.2/x86_64-linux-thread-multi /nix/store/yj4b630bm6yscdw8j2sa1sb61j3rdqsy-perl-5.24.2/lib/perl5/site_perl/5.24.2 /nix/store/yj4b630bm6yscdw8j2sa1sb61j3rdqsy-perl-5.24.2/lib/perl5/site_perl /nix/store/yj4b630bm6yscdw8j2sa1sb61j3rdqsy-perl-5.24.2/lib/perl5/site_perl/5.24.2/x86_64-linux-thread-multi /nix/store/yj4b630bm6yscdw8j2sa1sb61j3rdqsy-perl-5.24.2/lib/perl5/site_perl/5.24.2 /nix/store/yj4b630bm6yscdw8j2sa1sb61j3rdqsy-perl-5.24.2/lib/perl5/5.24.2/x86_64-linux-thread-multi /nix/store/yj4b630bm6yscdw8j2sa1sb61j3rdqsy-perl-5.24.2/lib/perl5/5.24.2 .) at create-icons.pl line 23.
BEGIN failed--compilation aborted at create-icons.pl line 23.
make[1]: *** [Makefile:156: www/routino/icons/ball-0.png] Error 2

@dotlambda
Copy link
Member Author

I don't see the error with the icon anymore. Can you please check if that's the case on your side as well?
I think the icon is only necessary for the web interface, which cannot be used anyways.

@orivej
Copy link
Contributor

orivej commented Sep 28, 2017

I don't see this error too.

I had to change installFlags into makeFlags, otherwise it compiled the sources with -DROUTINO_DATADIR=\"/usr/local/share/routino\". I'm going to merge this if you don't mind.

@dotlambda
Copy link
Member Author

Okay, thats fine with me :)

@orivej orivej merged commit ebe52a7 into NixOS:master Sep 28, 2017
@dotlambda dotlambda deleted the routino branch January 17, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants