From e79d9d6fc1cc7615abbd21889832c4269b24980f Mon Sep 17 00:00:00 2001 From: Niklaus Giger Date: Wed, 17 Feb 2021 08:57:17 +0100 Subject: [PATCH 1/2] maintainers: add ngiger --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8fdbc385d9b78..084fd23a03c15 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8628,6 +8628,12 @@ email = "nfjinjing@gmail.com"; name = "Jinjing Wang"; }; + ngiger = { + email = "niklaus.giger@member.fsf.org"; + github = "ngiger"; + githubId = 265800; + name = "Niklaus Giger"; + }; nh2 = { email = "mail@nh2.me"; matrix = "@nh2:matrix.org"; From 484cf053176d6326cc1afef5188ab1db5c5e8f7d Mon Sep 17 00:00:00 2001 From: Niklaus Giger Date: Wed, 17 Feb 2021 09:06:32 +0100 Subject: [PATCH 2/2] postrunner: init at 1.0.5 --- pkgs/applications/misc/postrunner/Gemfile | 2 + .../applications/misc/postrunner/Gemfile.lock | 25 +++++++ pkgs/applications/misc/postrunner/default.nix | 21 ++++++ pkgs/applications/misc/postrunner/gemset.nix | 75 +++++++++++++++++++ pkgs/applications/misc/postrunner/tests.nix | 20 +++++ pkgs/top-level/all-packages.nix | 2 + 6 files changed, 145 insertions(+) create mode 100644 pkgs/applications/misc/postrunner/Gemfile create mode 100644 pkgs/applications/misc/postrunner/Gemfile.lock create mode 100644 pkgs/applications/misc/postrunner/default.nix create mode 100644 pkgs/applications/misc/postrunner/gemset.nix create mode 100644 pkgs/applications/misc/postrunner/tests.nix diff --git a/pkgs/applications/misc/postrunner/Gemfile b/pkgs/applications/misc/postrunner/Gemfile new file mode 100644 index 0000000000000..f507ca525d3a4 --- /dev/null +++ b/pkgs/applications/misc/postrunner/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'postrunner' diff --git a/pkgs/applications/misc/postrunner/Gemfile.lock b/pkgs/applications/misc/postrunner/Gemfile.lock new file mode 100644 index 0000000000000..2254e61ae5596 --- /dev/null +++ b/pkgs/applications/misc/postrunner/Gemfile.lock @@ -0,0 +1,25 @@ +GEM + remote: https://rubygems.org/ + specs: + bindata (2.4.10) + fit4ruby (3.9.0) + bindata (~> 2.4.8) + mini_portile2 (2.7.1) + nokogiri (1.13.1) + mini_portile2 (~> 2.7.0) + racc (~> 1.4) + perobs (4.3.0) + postrunner (1.0.5) + fit4ruby (~> 3.9.0) + nokogiri + perobs (~> 4.3.0) + racc (1.6.0) + +PLATFORMS + ruby + +DEPENDENCIES + postrunner + +BUNDLED WITH + 2.1.4 diff --git a/pkgs/applications/misc/postrunner/default.nix b/pkgs/applications/misc/postrunner/default.nix new file mode 100644 index 0000000000000..1f4d4c104b206 --- /dev/null +++ b/pkgs/applications/misc/postrunner/default.nix @@ -0,0 +1,21 @@ +# To run it call: nix-build -A postrunner.tests +{ lib, bundlerApp, bundlerUpdateScript, callPackage }: + +bundlerApp { + pname = "postrunner"; + gemdir = ./.; + exes = [ "postrunner" ]; + passthru.updateScript = bundlerUpdateScript "postrunner"; + passthru.tests = { + simple-execution = callPackage ./tests.nix { }; + }; + + + meta = with lib; { + description = "PostRunner is an application to manage FIT files produced by Garmin products"; + homepage = "https://github.com/scrapper/postrunner"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ ngiger ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/applications/misc/postrunner/gemset.nix b/pkgs/applications/misc/postrunner/gemset.nix new file mode 100644 index 0000000000000..40be7932badff --- /dev/null +++ b/pkgs/applications/misc/postrunner/gemset.nix @@ -0,0 +1,75 @@ +{ + bindata = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "06lqi4svq5qls9f7nnvd2zmjdqmi2sf82sq78ci5d78fq0z5x2vr"; + type = "gem"; + }; + version = "2.4.10"; + }; + fit4ruby = { + dependencies = ["bindata"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1s30g027v0pvk53fgkszm1qj7mmljgam4gwd9wbljap7i4c32w7d"; + type = "gem"; + }; + version = "3.9.0"; + }; + mini_portile2 = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0d3ga166pahsxavzwj19yjj4lr13rw1vsb36s2qs8blcxigrdp6z"; + type = "gem"; + }; + version = "2.7.1"; + }; + nokogiri = { + dependencies = ["mini_portile2" "racc"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zqzawia52cdcmi55lp7v8jmiqyw7pcpwsksqlnirwfm3f7bnf11"; + type = "gem"; + }; + version = "1.13.1"; + }; + perobs = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0cygqn869fvlsiq27qfg5ak8dr7pagp8yqr34h0hvzg8h8yq9fjq"; + type = "gem"; + }; + version = "4.3.0"; + }; + postrunner = { + dependencies = ["fit4ruby" "nokogiri" "perobs"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "116xs2zn1178906ybpfll3f1k0jai2ccr3bxq1c175faiskdalxg"; + type = "gem"; + }; + version = "1.0.5"; + }; + racc = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0la56m0z26j3mfn1a9lf2l03qx1xifanndf9p3vx1azf6sqy7v9d"; + type = "gem"; + }; + version = "1.6.0"; + }; +} diff --git a/pkgs/applications/misc/postrunner/tests.nix b/pkgs/applications/misc/postrunner/tests.nix new file mode 100644 index 0000000000000..118dba489aaac --- /dev/null +++ b/pkgs/applications/misc/postrunner/tests.nix @@ -0,0 +1,20 @@ +{ runCommand, postrunner, stdenv }: + +let + inherit (postrunner) name; + version = (import ./gemset.nix).postrunner.version; +in + +runCommand "${name}-tests" { meta.timeout = 3; } + '' + # get version of installed program and compare with package version + if [[ `${postrunner}/bin/postrunner version` != *"${version}"* ]]; then + echo "Error: program version does not match package version" + exit 1 + fi + # run help + ${postrunner}/bin/postrunner --help | grep 'Usage postrunner .command. .options.' + echo All test for $name passed + # needed for Nix to register the command as successful + touch $out + '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8d8ee6f3bd824..2d5201d7a468b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26485,6 +26485,8 @@ with pkgs; buildGoModule = buildGo117Module; }; + postrunner = callPackage ../applications/misc/postrunner { }; + slack = callPackage ../applications/networking/instant-messengers/slack { }; slack-cli = callPackage ../tools/networking/slack-cli { };