Add cddl and cbor-diag

This commit is contained in:
Moritz Angermann 2022-11-14 11:41:57 +08:00
parent d573dfdb99
commit 0d8cff69ad
9 changed files with 324 additions and 0 deletions

View File

@ -65,6 +65,10 @@
sha256 = "sha256-Ff9bMzxhCUBgsqUunB2OxVzELdAp45yiKr2qkJUm/tY="; };
});
});
cddl-tools = (final: prev: {
cbor-diag = final.callPackage ./pkgs/cbor-diag { };
cddl = final.callPackage ./pkgs/cddl { };
});
};
supportedSystems = [
"x86_64-linux"
@ -124,6 +128,10 @@
# for libstdc++; ghc not being able to find this properly is bad,
# it _should_ probably call out to a g++ or clang++ but doesn't.
pkgs.stdenv.cc.cc.lib
pkgs.cddl
pkgs.cbor-diag
] ++ map pkgs.lib.getDev (with pkgs; [ libsodium-vrf secp256k1 R_4_1_3 zlib openssl ] ++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isLinux systemd);
}) (compilers pkgs) //
(let static-pkgs = if pkgs.stdenv.hostPlatform.isLinux then pkgs.pkgsCross.musl64 else pkgs; in
@ -214,6 +222,8 @@
haskell-nix.cabal-install.${compiler-nix-name}
pkgconfig
stdenv.cc.cc.lib
cddl
cbor-diag
]);
}))) (compilers static-pkgs.buildPackages)));
hydraJobs = devShells;

2
pkgs/cbor-diag/Gemfile Normal file
View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'cbor-diag'

View File

@ -0,0 +1,27 @@
GEM
remote: https://rubygems.org/
specs:
cbor-canonical (0.1.2)
cbor-deterministic (0.1.3)
cbor-diag (0.7.6)
cbor-canonical
cbor-deterministic
cbor-packed
json
neatjson
treetop (~> 1)
cbor-packed (0.1.3)
json (2.6.1)
neatjson (0.9)
polyglot (0.3.5)
treetop (1.6.11)
polyglot (~> 0.3)
PLATFORMS
ruby
DEPENDENCIES
cbor-diag
BUNDLED WITH
2.3.6

View File

@ -0,0 +1,19 @@
{ lib, bundlerApp, bundlerUpdateScript }:
bundlerApp {
pname = "cbor-diag";
gemdir = ./.;
exes = [
"cbor2diag.rb"
"cbor2json.rb"
"cbor2pretty.rb"
"cbor2yaml.rb"
"diag2cbor.rb"
"diag2pretty.rb"
"json2cbor.rb"
"json2pretty.rb"
"pretty2cbor.rb"
"pretty2diag.rb"
"yaml2cbor.rb"
];
}

84
pkgs/cbor-diag/gemset.nix Normal file
View File

@ -0,0 +1,84 @@
{
cbor-canonical = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1fhj51s5d9b9spw096sb0p92bgilw9hrsay383563dh913j2jn11";
type = "gem";
};
version = "0.1.2";
};
cbor-deterministic = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1w1mg4mn1dhlxlbijxpzja8m8ggrjs0hzkzvnaazw9zm1ji6dpba";
type = "gem";
};
version = "0.1.3";
};
cbor-diag = {
dependencies = ["cbor-canonical" "cbor-deterministic" "cbor-packed" "json" "neatjson" "treetop"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1r84bf00h6lv05l9bb9sj27jl5kbr466qk4i18z3fimn3z62i908";
type = "gem";
};
version = "0.7.6";
};
cbor-packed = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "046vj3i603i0skv80cynlqkh3di5419hbsfi10i69pc08wvggk6l";
type = "gem";
};
version = "0.1.3";
};
json = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1z9grvjyfz16ag55hg522d3q4dh07hf391sf9s96npc0vfi85xkz";
type = "gem";
};
version = "2.6.1";
};
neatjson = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0fa2v7b6433j0iqh5iq9r71v7a5xabgjvqwsbl21vcsac7vf3ncw";
type = "gem";
};
version = "0.9";
};
polyglot = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr";
type = "gem";
};
version = "0.3.5";
};
treetop = {
dependencies = ["polyglot"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0697qz1akblf8r3wi0s2dsjh468hfsd57fb0mrp93z35y2ni6bhh";
type = "gem";
};
version = "1.6.11";
};
}

2
pkgs/cddl/Gemfile Normal file
View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'cddl'

38
pkgs/cddl/Gemfile.lock Normal file
View File

@ -0,0 +1,38 @@
GEM
remote: https://rubygems.org/
specs:
abnc (0.1.0)
abnftt (0.2.2)
cbor-canonical (0.1.2)
cbor-deterministic (0.1.3)
cbor-diag (0.7.6)
cbor-canonical
cbor-deterministic
cbor-packed
json
neatjson
treetop (~> 1)
cbor-packed (0.1.3)
cddl (0.8.27)
abnc
abnftt
cbor-diag
colorize
json
regexp-examples
colorize (0.8.1)
json (2.6.1)
neatjson (0.9)
polyglot (0.3.5)
regexp-examples (1.5.1)
treetop (1.6.11)
polyglot (~> 0.3)
PLATFORMS
ruby
DEPENDENCIES
cddl
BUNDLED WITH
2.3.6

7
pkgs/cddl/default.nix Normal file
View File

@ -0,0 +1,7 @@
{ lib, bundlerApp, bundlerUpdateScript }:
bundlerApp {
pname = "cddl";
gemdir = ./.;
exes = [ "cddl" ];
}

135
pkgs/cddl/gemset.nix Normal file
View File

@ -0,0 +1,135 @@
{
abnc = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "13nvzrk72nj130fs8bq8q3cfm48939rdzh7l31ncj5c4969hrbig";
type = "gem";
};
version = "0.1.0";
};
abnftt = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "06ixnwqh5j83z7q7dab3p4xa3vbc332y42i7zkj1x6hzsvvkwngj";
type = "gem";
};
version = "0.2.2";
};
cbor-canonical = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1fhj51s5d9b9spw096sb0p92bgilw9hrsay383563dh913j2jn11";
type = "gem";
};
version = "0.1.2";
};
cbor-deterministic = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1w1mg4mn1dhlxlbijxpzja8m8ggrjs0hzkzvnaazw9zm1ji6dpba";
type = "gem";
};
version = "0.1.3";
};
cbor-diag = {
dependencies = ["cbor-canonical" "cbor-deterministic" "cbor-packed" "json" "neatjson" "treetop"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1r84bf00h6lv05l9bb9sj27jl5kbr466qk4i18z3fimn3z62i908";
type = "gem";
};
version = "0.7.6";
};
cbor-packed = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "046vj3i603i0skv80cynlqkh3di5419hbsfi10i69pc08wvggk6l";
type = "gem";
};
version = "0.1.3";
};
cddl = {
dependencies = ["abnc" "abnftt" "cbor-diag" "colorize" "json" "regexp-examples"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "09jw3ynhbrsim9vg83l6xrh168111xr6x8mzyp5zqpm782gzqs5v";
type = "gem";
};
version = "0.8.27";
};
colorize = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b";
type = "gem";
};
version = "0.8.1";
};
json = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1z9grvjyfz16ag55hg522d3q4dh07hf391sf9s96npc0vfi85xkz";
type = "gem";
};
version = "2.6.1";
};
neatjson = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0fa2v7b6433j0iqh5iq9r71v7a5xabgjvqwsbl21vcsac7vf3ncw";
type = "gem";
};
version = "0.9";
};
polyglot = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr";
type = "gem";
};
version = "0.3.5";
};
regexp-examples = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0wfkwczjn62qq3z96dxk43m0gh6d5cajx9pxkanvk88d3yqnx29v";
type = "gem";
};
version = "1.5.1";
};
treetop = {
dependencies = ["polyglot"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0697qz1akblf8r3wi0s2dsjh468hfsd57fb0mrp93z35y2ni6bhh";
type = "gem";
};
version = "1.6.11";
};
}