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

almonds: init at 2015-12-27 #34169

Merged
merged 1 commit into from Jan 23, 2018
Merged

almonds: init at 2015-12-27 #34169

merged 1 commit into from Jan 23, 2018

Conversation

infinisil
Copy link
Member

Motivation for this change

Almonds is a pretty cool terminal mandelbrot set explorer!

screenshot

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
    • 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/)
  • Fits CONTRIBUTING.md.

@infinisil
Copy link
Member Author

The package doesn't have a license (https://github.com/Tenchi2xh/Almonds), so i didn't set it, not sure what's the usual way to handle this

@@ -18981,6 +18981,8 @@ with pkgs;

### SCIENCE/MATH

almonds = callPackage ../applications/science/math/almonds { };
Copy link
Member

Choose a reason for hiding this comment

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

Better use pythonPackages.callPackage. This way you won't need pythonPackages as an argument.

{ pythonPackages, fetchFromGitHub, ncurses }:

pythonPackages.buildPythonPackage {
name = "almonds-2015-12-27";
Copy link
Member

Choose a reason for hiding this comment

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

What's wrong with the last stable release?
Also please split this up into pname and version and leave out name.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I think the latter would only make sense when using buildPythonPackage. Sorry :)

description = "Terminal Mandelbrot fractal viewer";
homepage = https://github.com/Tenchi2xh/Almonds;
maintainers = with maintainers; [ infinisil ];
platforms = platforms.linux;
Copy link
Member

Choose a reason for hiding this comment

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

Any reason for this?
It should build on Darwin as well. Since buildPythonApplication automatically sets the platform, you can just leave out platforms.

@@ -0,0 +1,28 @@
{ pythonPackages, fetchFromGitHub, ncurses }:

pythonPackages.buildPythonPackage {
Copy link
Member

Choose a reason for hiding this comment

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

Use buildPythonApplication since it's not a python module.

@dotlambda
Copy link
Member

If there's no license, I'd say we don't have any freedom with regards to using the code. So it is unfree.
I would explicitly set license = licenses.unfree and add a comment that the license is missing.
Maybe you can also file an issue upstream.

@infinisil
Copy link
Member Author

Hmm, I'm not so sure how I feel about the unfree license, since this hides it from some listings (such as https://nixos.org/nixos/packages.html) and it being unfree was most likely not the intention of the author, used it for now anyways though. I fixed all the stuff you mentioned @dotlambda

};

buildInputs = [
pytest
Copy link
Member

Choose a reason for hiding this comment

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

Please move this into nativeBuildInputs and add checkPhase = "py.test";.

meta = with stdenv.lib; {
description = "Terminal Mandelbrot fractal viewer";
homepage = https://github.com/Tenchi2xh/Almonds;
license = licenses.unfree;
Copy link
Member

Choose a reason for hiding this comment

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

A comment about why it is unfree would be nice.

@infinisil
Copy link
Member Author

Done that

@FRidh
Copy link
Member

FRidh commented Jan 23, 2018

@GrahamcOfBorg build almonds

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-linux

Package ‘almonds-1.25b’ in /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/applications/science/math/almonds/default.nix:23 has an unfree license (‘unfree’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: aarch64-linux

Package ‘almonds-1.25b’ in /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/applications/science/math/almonds/default.nix:23 has an unfree license (‘unfree’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

@FRidh FRidh merged commit 8510550 into NixOS:master Jan 23, 2018
Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

Package ‘almonds-1.25b’ in /tmp/nix-ofborg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/applications/science/math/almonds/default.nix:23 has an unfree license (‘unfree’), refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

@infinisil
Copy link
Member Author

Oh, i should've changed the commit message

@infinisil infinisil mentioned this pull request Sep 8, 2018
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.

None yet

4 participants