pkgs: add json-schema-for-humans #39

Closed
astro wants to merge 1 commits from astro/nix-scripts:json-schema-for-humans into master
2 changed files with 47 additions and 3 deletions

View File

@ -2,7 +2,7 @@
with pkgs;
let
artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0";
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchgit fetchFromGitHub python3Packages; misoc-new = artiq6; };
pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchgit fetchFromGitHub fetchurl python3Packages; misoc-new = artiq6; };
boards = [
{ target = "kasli"; variant = "tester"; }
@ -20,7 +20,7 @@ let
}) {} boards;
mainPackages = rec {
inherit (pythonDeps) sipyco asyncserial pythonparser pyqtgraph-qt5 artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck;
inherit (pythonDeps) sipyco asyncserial pythonparser pyqtgraph-qt5 artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck json-schema-for-humans;
binutils-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; };
binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; };
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, fetchFromGitHub, python3Packages, misoc-new }:
{ stdenv, fetchgit, fetchFromGitHub, fetchurl, python3Packages, misoc-new }:
rec {
# User dependencies
@ -305,4 +305,48 @@ rec {
license = licenses.bsd3;
};
};
# JSON schema tools
json-schema-for-humans = python3Packages.buildPythonApplication rec {
pname = "json-schema-for-humans";
version = "0.27.0";
src = fetchFromGitHub {
owner = "coveooss";
repo = pname;
rev = "v${version}";
sha256 = "1r40i192z6aasil5vsgcgp5yvx392dhhqnfc2qxbxvpja6l3p6p2";
};
patches = [ (fetchurl {
url = "https://github.com/coveooss/json-schema-for-humans/commit/1fe2e2391da5a796204fd1889e4a11a53f83f7c9.patch";
sha256 = "0kpydpddlg0rib9snl8albhbrrs6d3ds292gpgpg7bdpqrwamdib";
}) (fetchurl {
url = "https://github.com/coveooss/json-schema-for-humans/pull/66.patch";
sha256 = "142a07v8bn1j20b7177yb60f4944kbx4cdqqq2nz6xkxmamw704d";
}) ];
nativeBuildInputs = [ python3Packages.pbr ];
propagatedBuildInputs = with python3Packages; [
click
dataclasses-json
htmlmin
jinja2
markdown2
pygments
pytz
pyyaml
requests
];
preBuild = ''
export PBR_VERSION=0.0.1
'';
checkInputs = with python3Packages; [
pytest beautifulsoup4
];
meta = with stdenv.lib; {
description = "Quickly generate HTML documentation from a JSON schema";
homepage = "https://github.com/coveooss/json-schema-for-humans";
license = licenses.asl20;
};
};
}