From dc433b476eb72db89c990676e8f64e21b91c1807 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Thu, 19 Apr 2018 12:18:49 +0200 Subject: [PATCH] oxidized: init at 0.21.0 --- .../ruby-modules/gem-config/default.nix | 7 + pkgs/tools/admin/oxidized/Gemfile | 5 + pkgs/tools/admin/oxidized/Gemfile.lock | 69 ++++++ pkgs/tools/admin/oxidized/default.nix | 18 ++ pkgs/tools/admin/oxidized/gemset.nix | 206 ++++++++++++++++++ .../admin/oxidized/temporary-x-series.patch | 13 ++ pkgs/top-level/all-packages.nix | 2 + 7 files changed, 320 insertions(+) create mode 100644 pkgs/tools/admin/oxidized/Gemfile create mode 100644 pkgs/tools/admin/oxidized/Gemfile.lock create mode 100644 pkgs/tools/admin/oxidized/default.nix create mode 100644 pkgs/tools/admin/oxidized/gemset.nix create mode 100644 pkgs/tools/admin/oxidized/temporary-x-series.patch diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 83ab5e0d86ff..60697e72d724 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -208,6 +208,13 @@ in ] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}"; }; + oxidized = attrs: { + postInstall = '' + cd "$(cat "$out/nix-support/gem-meta/install-path")" + patch -p1 < ${../../../tools/admin/oxidized/temporary-x-series.patch} + ''; + }; + pango = attrs: { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ gtk2 xorg.libXdmcp pcre xorg.libpthreadstubs ]; diff --git a/pkgs/tools/admin/oxidized/Gemfile b/pkgs/tools/admin/oxidized/Gemfile new file mode 100644 index 000000000000..6a9a4254b11b --- /dev/null +++ b/pkgs/tools/admin/oxidized/Gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gem 'oxidized' +gem 'oxidized-web' +gem 'oxidized-script' diff --git a/pkgs/tools/admin/oxidized/Gemfile.lock b/pkgs/tools/admin/oxidized/Gemfile.lock new file mode 100644 index 000000000000..1570adbcf089 --- /dev/null +++ b/pkgs/tools/admin/oxidized/Gemfile.lock @@ -0,0 +1,69 @@ +GEM + remote: https://rubygems.org/ + specs: + asetus (0.3.0) + backports (3.11.2) + emk-sinatra-url-for (0.2.1) + sinatra (>= 0.9.1.1) + ffi (1.9.23) + haml (4.0.7) + tilt + htmlentities (4.3.4) + multi_json (1.13.1) + net-ssh (4.1.0) + oxidized (0.21.0) + asetus (~> 0.1) + net-ssh (~> 4.1.0) + rugged (~> 0.21, >= 0.21.4) + slop (~> 3.5) + oxidized-script (0.5.0) + oxidized (~> 0.21.0) + slop (~> 3.5) + oxidized-web (0.9.3) + emk-sinatra-url-for (~> 0.2) + haml (~> 4.0) + htmlentities (~> 4.3) + oxidized (~> 0.21.0) + puma (~> 3) + sass (~> 3.3) + sinatra (~> 1.4, >= 1.4.6) + sinatra-contrib (~> 1.4, >= 1.4.6) + puma (3.11.3) + rack (1.6.9) + rack-protection (1.5.5) + rack + rack-test (1.0.0) + rack (>= 1.0, < 3) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rugged (0.27.0) + sass (3.5.6) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sinatra (1.4.8) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + sinatra-contrib (1.4.7) + backports (>= 2.0) + multi_json + rack-protection + rack-test + sinatra (~> 1.4.0) + tilt (>= 1.3, < 3) + slop (3.6.0) + tilt (2.0.8) + +PLATFORMS + ruby + +DEPENDENCIES + oxidized + oxidized-script + oxidized-web + +BUNDLED WITH + 1.14.6 diff --git a/pkgs/tools/admin/oxidized/default.nix b/pkgs/tools/admin/oxidized/default.nix new file mode 100644 index 000000000000..590f6ea55ca7 --- /dev/null +++ b/pkgs/tools/admin/oxidized/default.nix @@ -0,0 +1,18 @@ +{ lib, fetchFromGitHub, ruby, git, bundlerApp }: + +bundlerApp rec { + pname = "oxidized"; + gemdir = ./.; + + inherit ruby; + + exes = [ "oxidized" "oxidized-web" "oxidized-script" ]; + + meta = with lib; { + description = "Oxidized is a network device configuration backup tool. It's a RANCID replacement!"; + homepage = https://github.com/ytti/oxidized; + license = licenses.asl20; + maintainers = [ maintainers.willibutz ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/admin/oxidized/gemset.nix b/pkgs/tools/admin/oxidized/gemset.nix new file mode 100644 index 000000000000..f472b14e7967 --- /dev/null +++ b/pkgs/tools/admin/oxidized/gemset.nix @@ -0,0 +1,206 @@ +{ + asetus = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zkr8cbp8klanqmhzz7qmimzlxh6zmsy98zb3s75af34l7znq790"; + type = "gem"; + }; + version = "0.3.0"; + }; + backports = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0sw58rsz1hl821ia1jj3nnl3jr7xwfkcljgs56kpq3fakzcljcdz"; + type = "gem"; + }; + version = "3.11.2"; + }; + emk-sinatra-url-for = { + dependencies = ["sinatra"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0rd5b1lraklv0hblzdnmw2z3dragfg0qqk7wxbpn58f8y7jxzjgj"; + type = "gem"; + }; + version = "0.2.1"; + }; + ffi = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0zw6pbyvmj8wafdc7l5h7w20zkp1vbr2805ql5d941g2b20pk4zr"; + type = "gem"; + }; + version = "1.9.23"; + }; + haml = { + dependencies = ["tilt"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0mrzjgkygvfii66bbylj2j93na8i89998yi01fin3whwqbvx0m1p"; + type = "gem"; + }; + version = "4.0.7"; + }; + htmlentities = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"; + type = "gem"; + }; + version = "4.3.4"; + }; + multi_json = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1rl0qy4inf1mp8mybfk56dfga0mvx97zwpmq5xmiwl5r770171nv"; + type = "gem"; + }; + version = "1.13.1"; + }; + net-ssh = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "013p5jb4wy0cq7x7036piw2a3s1i9p752ki1srx2m289mpz4ml3q"; + type = "gem"; + }; + version = "4.1.0"; + }; + oxidized = { + dependencies = ["asetus" "net-ssh" "rugged" "slop"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0xqx0iawj2cm6083a61y43d6a76xaypiw0nkyirx02lhynq07yz0"; + type = "gem"; + }; + version = "0.21.0"; + }; + oxidized-script = { + dependencies = ["oxidized" "slop"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "12c15gksrrar9kradcv6mx2d4a8ixa4lykszb4pcapiw5mi35mxp"; + type = "gem"; + }; + version = "0.5.0"; + }; + oxidized-web = { + dependencies = ["emk-sinatra-url-for" "haml" "htmlentities" "oxidized" "puma" "sass" "sinatra" "sinatra-contrib"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "14s10pr8qaq6g19zi753igngp02li46k3nm5ap537r3743v1l4f9"; + type = "gem"; + }; + version = "0.9.3"; + }; + puma = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "03313mnx8n6g9qs9l5zafqq90grrhq2nqrmjs8lsffi28mgd3cfd"; + type = "gem"; + }; + version = "3.11.3"; + }; + rack = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "03w1ri5l91q800f1bdcdl5rbagy7s4kml136b42s2lmxmznxhr07"; + type = "gem"; + }; + version = "1.6.9"; + }; + rack-protection = { + dependencies = ["rack"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0my0wlw4a5l3hs79jkx2xzv7djhajgf8d28k8ai1ddlnxxb0v7ss"; + type = "gem"; + }; + version = "1.5.5"; + }; + rack-test = { + dependencies = ["rack"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1l799s5qr2qrshvrggq5ch3v235y491zfww07b39w4pj4vpa65l1"; + type = "gem"; + }; + version = "1.0.0"; + }; + rb-fsevent = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"; + type = "gem"; + }; + version = "0.10.3"; + }; + rb-inotify = { + dependencies = ["ffi"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"; + type = "gem"; + }; + version = "0.9.10"; + }; + rugged = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0q1krxgd0ql03x8m9m05x5sxizw5sc7lms7rkp44qf45grpdk3v3"; + type = "gem"; + }; + version = "0.27.0"; + }; + sass = { + dependencies = ["sass-listen"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "19wyzp9qsg8hdkkxlsv713w0qmy66qrdp0shj42587ssx4qhrlag"; + type = "gem"; + }; + version = "3.5.6"; + }; + sass-listen = { + dependencies = ["rb-fsevent" "rb-inotify"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"; + type = "gem"; + }; + version = "4.0.0"; + }; + sinatra = { + dependencies = ["rack" "rack-protection" "tilt"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0byxzl7rx3ki0xd7aiv1x8mbah7hzd8f81l65nq8857kmgzj1jqq"; + type = "gem"; + }; + version = "1.4.8"; + }; + sinatra-contrib = { + dependencies = ["backports" "multi_json" "rack-protection" "rack-test" "sinatra" "tilt"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0vi3i0icbi2figiayxpvxbqpbn1syma7w4p4zw5mav1ln4c7jnfr"; + type = "gem"; + }; + version = "1.4.7"; + }; + slop = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"; + type = "gem"; + }; + version = "3.6.0"; + }; + tilt = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0020mrgdf11q23hm1ddd6fv691l51vi10af00f137ilcdb2ycfra"; + type = "gem"; + }; + version = "2.0.8"; + }; +} diff --git a/pkgs/tools/admin/oxidized/temporary-x-series.patch b/pkgs/tools/admin/oxidized/temporary-x-series.patch new file mode 100644 index 000000000000..ef6234dc40b9 --- /dev/null +++ b/pkgs/tools/admin/oxidized/temporary-x-series.patch @@ -0,0 +1,13 @@ +diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb +index f602a36..3f3a0f9 100644 +--- a/lib/oxidized/model/powerconnect.rb ++++ b/lib/oxidized/model/powerconnect.rb +@@ -4,7 +4,7 @@ class PowerConnect < Oxidized::Model + + comment '! ' + +- expect /^\s*--More--\s+.*$/ do |data, re| ++ expect /^([[:cntrl:]]...More:|\s*--More--\s+).*$/ do |data, re| + send ' ' + data.sub re, '' + end diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0778f73d4eef..84311e2559e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4231,6 +4231,8 @@ with pkgs; owncloud-client = libsForQt5.callPackage ../applications/networking/owncloud-client { }; + oxidized = callPackage ../tools/admin/oxidized { }; + oxipng = callPackage ../tools/graphics/oxipng { }; p2pvc = callPackage ../applications/video/p2pvc {};