Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d53540dd3215
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6eff61d6a155
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on May 4, 2017

  1. Copy the full SHA
    10abea9 View commit details
  2. Merge pull request #25486 from apeschar/master

    pythonPackages.PyLD: init at 0.7.2
    FRidh authored May 4, 2017
    Copy the full SHA
    6eff61d View commit details
Showing with 59 additions and 0 deletions.
  1. +1 −0 lib/maintainers.nix
  2. +56 −0 pkgs/development/python-modules/PyLD/default.nix
  3. +2 −0 pkgs/top-level/python-packages.nix
1 change: 1 addition & 0 deletions lib/maintainers.nix
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@
andsild = "Anders Sildnes <andsild@gmail.com>";
aneeshusa = "Aneesh Agrawal <aneeshusa@gmail.com>";
antono = "Antono Vasiljev <self@antono.info>";
apeschar = "Albert Peschar <albert@peschar.net>";
apeyroux = "Alexandre Peyroux <alex@px.io>";
ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>";
aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
56 changes: 56 additions & 0 deletions pkgs/development/python-modules/PyLD/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ stdenv, fetchPypi, buildPythonPackage, fetchFromGitHub, python, gnugrep }:

let

json-ld = fetchFromGitHub {
owner = "json-ld";
repo = "json-ld.org";
rev = "843a70e4523d7cd2a4d3f5325586e726eb1b123f";
sha256 = "05j0nq6vafclyypxjj30iw898ig0m32nvz0rjdlslx6lawkiwb2a";
};

normalization = fetchFromGitHub {
owner = "json-ld";
repo = "normalization";
rev = "aceeaf224b64d6880189d795bd99c3ffadb5d79e";
sha256 = "125q5rllfm8vg9mz8hn7bhvhv2vqpd86kx2kxlk84smh33l8kbyl";
};

in

buildPythonPackage rec {
pname = "PyLD";
version = "0.7.2";
name = "${pname}-${version}";

src = fetchFromGitHub {
owner = "digitalbazaar";
repo = "pyld";
rev = "652473f828e9a396d4c1db9addbd294fb7db1797";
sha256 = "1bmpz4s6j7by6l45wwxy7dn7hmrhxc26kbx2hbfy41x29vbjg6j9";
};

# Unfortunately PyLD does not pass all testcases in the JSON-LD corpus. We
# check for at least a minimum amount of successful tests so we know it's not
# getting worse, at least.
checkPhase = ''
ok_min=401
if ! ${python.interpreter} tests/runtests.py -d ${json-ld}/test-suite 2>&1 | tee test.out; then
ok_count=$(${gnugrep}/bin/grep -F '... ok' test.out | wc -l)
if [[ $ok_count -lt $ok_min ]]; then
echo "Less than $ok_min tests passed ($ok_count). Failing the build."
exit 1
fi
fi
${python.interpreter} tests/runtests.py -d ${normalization}/tests
'';

meta = with stdenv.lib; {
description = "Python implementation of the JSON-LD API";
homepage = "https://github.com/digitalbazaar/pyld";
license = licenses.bsd3;
maintainers = with maintainers; [ apeschar ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -5087,6 +5087,8 @@ in {
};
};

PyLD = callPackage ../development/python-modules/PyLD { };

python-jose = callPackage ../development/python-modules/python-jose {};

pyhepmc = buildPythonPackage rec {