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

ansicolor: init at 0.2.4 #22462

Merged
merged 1 commit into from
Feb 5, 2017
Merged

ansicolor: init at 0.2.4 #22462

merged 1 commit into from
Feb 5, 2017

Conversation

andsild
Copy link
Contributor

@andsild andsild commented Feb 5, 2017

Motivation for this change

New library, not previously in nixpkgs
Needed dependency for vim-vint, which I'll post a PR for after this one goes through. I have verified that vim-vint, which depends on ansicolor, works on my local computer.

The tests for ansicolor do not work in the nix installer. I'm not sure how to fix it and I didn't get a response on the IRC channel. Hoping someone here can help me or point me to the right direction. Otherwise, seems like a lot pythonpackages in nixpkgs suppress tests anyway?

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 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.

name = "ansicolor-${version}";
version = "0.2.4";

src = pkgs.fetchurl{
Copy link
Member

Choose a reason for hiding this comment

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

Better to replace with fetchFromGitHub.

fetchFromGitHub {
  owner = "numerodix";
  repo = "ansicolor";
  rev = version;
  sha256 = "...";
}

Also, the package is available on pypi, so it might be preferred.

Copy link
Contributor Author

@andsild andsild Feb 5, 2017

Choose a reason for hiding this comment

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

@rasendubi: I changed to pypi. Interestingly, there are no tests in the pypi package of ansicolor. Therefore I bypassed the test problem. I've verified that the library still works by running its demos using
nix-shell -I nixpkgs=. --pure -p pythonPackages.ansicolor --command "python -m ansicolor.demos --color"

meta = {
homepage = "https://github.com/numerodix/ansicolor/";
description = "A library to produce ansi color output and colored highlighting and diffing";
license = "apache";
Copy link
Member

Choose a reason for hiding this comment

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

licenses.asl20 is Apache License 2.0.

Copy link
Member

@rasendubi rasendubi left a comment

Choose a reason for hiding this comment

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

Looks good to me. Also, builds fine on NixOS with sandboxing.

@rasendubi rasendubi merged commit 3bdfd75 into NixOS:master Feb 5, 2017
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

2 participants