forked from mirrors/nixpkgs
Adding jq JSON processor
This commit is contained in:
parent
a453e49511
commit
ccc11345c9
|
@ -9,6 +9,6 @@ relpath="${path#$server}"
|
|||
|
||||
echo "URL: $url" >&2
|
||||
|
||||
curl -L -k "$url" | sed -re 's/^/-/;s/[hH][rR][eE][fF]=("([^"]*)"|([^" <>&]+)[ <>&])/\n+\2\3\n-/g' | \
|
||||
curl -L -k "$url" | sed -re 's/^/-/;s/[hH][rR][eE][fF]=("([^"]*)"|'\''([^'\'']*)'\''|([^"'\'' <>&]+)[ <>&])/\n+\2\3\4\n-/g' | \
|
||||
sed -e '/^-/d; s/^[+]//; /^#/d;'"s/^\\//$protocol:\\/\\/$server\\//g" | \
|
||||
sed -re 's`^[^:]*$`'"$protocol://$basepath/&\`"
|
||||
|
|
28
pkgs/development/tools/jq/default.nix
Normal file
28
pkgs/development/tools/jq/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{stdenv, fetchurl}:
|
||||
let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="jq";
|
||||
version="1.3";
|
||||
name="${baseName}-${version}";
|
||||
hash="1mzy9cj3d19y1m56mwk6slls543gnlhz8302hmnxkhdzdb1j6gv2";
|
||||
url="http://stedolan.github.io/jq/download/source/jq-1.3.tar.gz";
|
||||
sha256="1mzy9cj3d19y1m56mwk6slls543gnlhz8302hmnxkhdzdb1j6gv2";
|
||||
};
|
||||
buildInputs = [
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit (s) name version;
|
||||
inherit buildInputs;
|
||||
src = fetchurl {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
meta = {
|
||||
inherit (s) version;
|
||||
description = ''A lightweight and flexible command-line JSON processor'';
|
||||
license = stdenv.lib.licenses.mit ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
1
pkgs/development/tools/jq/default.upstream
Normal file
1
pkgs/development/tools/jq/default.upstream
Normal file
|
@ -0,0 +1 @@
|
|||
url http://stedolan.github.io/jq/download/
|
|
@ -1046,6 +1046,8 @@ let
|
|||
|
||||
jnettop = callPackage ../tools/networking/jnettop { };
|
||||
|
||||
jq = callPackage ../development/tools/jq {};
|
||||
|
||||
jscoverage = callPackage ../development/tools/misc/jscoverage { };
|
||||
|
||||
jwhois = callPackage ../tools/networking/jwhois { };
|
||||
|
|
Loading…
Reference in a new issue