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
20kly: init at 1.4 #45056
20kly: init at 1.4 #45056
Conversation
@GrahamcOfBorg build 20kly |
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: 20kly Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: 20kly Partial log (click to expand)
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: 20kly Partial log (click to expand)
|
pkgs/games/20kly/default.nix
Outdated
@@ -0,0 +1,37 @@ | |||
{ stdenv, fetchurl, python2Packages }: |
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.
This should be python
instead of python2Packages
. The packages can then be accessed with python.pkgs
. If it is not python3 compatible, you should add disabled = !isPy3
.
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.
Another one of my style preferences: I'd format the argument list like this:
{ stdenv
, fetchurl
, python2Packages
}:
Because of the same reasons as the list formatting in #45057.
pkgs/games/20kly/default.nix
Outdated
"LIGHTYEARS_DIR = \"$out/share\"" | ||
''; | ||
|
||
propagatedBuildInputs = with python2Packages; [ python pygame ]; |
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.
Again, I don't think python
belongs here.
pkgs/games/20kly/default.nix
Outdated
buildPhase = "python -O -m compileall ."; | ||
|
||
installPhase = '' | ||
mkdir -p $out/share |
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 quote shell variables.
pkgs/games/20kly/default.nix
Outdated
|
||
meta = with stdenv.lib; { | ||
description = "A steampunk-themed strategy game where you have to manage a steam supply network"; | ||
homepage = "http://jwhitham.org.uk/20kly/"; |
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.
Quoting unnecessary
0db6543
to
40e6745
Compare
@timokau all done @mpickering it's |
pkgs/games/20kly/default.nix
Outdated
pname = "20kly"; | ||
version = "1.4"; | ||
format = "other"; | ||
disabled = !(python.isPy3 or true); |
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.
Any reason for the or true
here?
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.
On python2 it's null
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.
x or y
should be sugar for if x==null then y else x
, but I can't find where it's documented, if it's documented at all
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.
On python2 it's null
Oh? That doesn't seem right.
And what do you want to express? Shouldn't it be disabled = !isPy2
, since you want to disable for everything that isn't python 2?
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 don't see anybody else using or null
. Does it make a difference if you add isPy2
to the argument list instead of using python.isPy2
?
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.
Did you try using isPyX
from the argument list instead?
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.
isn't that a callPythonPackage
-specific param?
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.
Maybe. Why aren't you using that?
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.
Sorry, that doesn't even exist 😅. I meant python-packages.nix
-specific, which I don't use because this is an application
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.
Well there is python.pkgs.callPackage
(which is used in python-packages.nix
). But outside of python-packages
you'd have to choose which python
to use. Which makes the point about disabled
kind of moot.
TLDR: I'm probably just not qualified to review a python application, sorry for the noise. I hope @domenkozar will add his opinion.
@GrahamcOfBorg build _20kly |
Success on x86_64-linux (full log) Attempted: _20kly Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: _20kly Partial log (click to expand)
|
Thanks for the changes! Actually, should this be in |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: _20kly Partial log (click to expand)
|
@timokau Nope, since it isn't a library (see the nixpkgs docs, python section) |
I just noticed that I pinged the wrong person, I meant @dotlambda. |
Motivation for this change
The classic "20,000 Light-Years Into Space" game
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)