From df77c19f759bbaffa5dffb49222ec97ffd5c14f5 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Fri, 3 May 2019 11:18:10 +0200 Subject: [PATCH] lolcat: use bundlerApp, fix audit warning --- pkgs/tools/misc/lolcat/Gemfile | 4 ++-- pkgs/tools/misc/lolcat/Gemfile.lock | 4 ++-- pkgs/tools/misc/lolcat/default.nix | 13 ++++--------- pkgs/tools/misc/lolcat/gemset.nix | 16 ++++++++++++---- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/misc/lolcat/Gemfile b/pkgs/tools/misc/lolcat/Gemfile index 63f6c6633b33..ea1216e2405d 100644 --- a/pkgs/tools/misc/lolcat/Gemfile +++ b/pkgs/tools/misc/lolcat/Gemfile @@ -1,2 +1,2 @@ -source "http://rubygems.org" -gem "lolcat" \ No newline at end of file +source "https://rubygems.org" +gem "lolcat" diff --git a/pkgs/tools/misc/lolcat/Gemfile.lock b/pkgs/tools/misc/lolcat/Gemfile.lock index e1e60663a270..fbb9b673dbcf 100644 --- a/pkgs/tools/misc/lolcat/Gemfile.lock +++ b/pkgs/tools/misc/lolcat/Gemfile.lock @@ -1,5 +1,5 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: lolcat (99.9.69) manpages (~> 0.6.1) @@ -16,4 +16,4 @@ DEPENDENCIES lolcat BUNDLED WITH - 1.16.3 + 1.17.2 diff --git a/pkgs/tools/misc/lolcat/default.nix b/pkgs/tools/misc/lolcat/default.nix index 827484e885fd..5b9466426bd9 100644 --- a/pkgs/tools/misc/lolcat/default.nix +++ b/pkgs/tools/misc/lolcat/default.nix @@ -1,19 +1,14 @@ -{ lib, bundlerEnv, ruby }: +{ lib, bundlerApp }: -bundlerEnv rec { - name = "${pname}-${version}"; +bundlerApp { pname = "lolcat"; - version = (import ./gemset.nix).lolcat.version; - - inherit ruby; - - # expects Gemfile, Gemfile.lock and gemset.nix in the same directory gemdir = ./.; + exes = [ "lolcat" ]; meta = with lib; { description = "A rainbow version of cat"; homepage = https://github.com/busyloop/lolcat; license = licenses.bsd3; - maintainers = with maintainers; [ StillerHarpo ]; + maintainers = with maintainers; [ StillerHarpo manveru ]; }; } diff --git a/pkgs/tools/misc/lolcat/gemset.nix b/pkgs/tools/misc/lolcat/gemset.nix index 9e351eecb829..cfd2467d922d 100644 --- a/pkgs/tools/misc/lolcat/gemset.nix +++ b/pkgs/tools/misc/lolcat/gemset.nix @@ -1,32 +1,40 @@ { lolcat = { dependencies = ["manpages" "optimist" "paint"]; + groups = ["default"]; + platforms = []; source = { - remotes = ["http://rubygems.org"]; + remotes = ["https://rubygems.org"]; sha256 = "0d1yh2ikyhyh7am4qznd6fzv2pyvk82xrnsrsbbyxzcqfz9x6aa9"; type = "gem"; }; version = "99.9.69"; }; manpages = { + groups = ["default"]; + platforms = []; source = { - remotes = ["http://rubygems.org"]; + remotes = ["https://rubygems.org"]; sha256 = "11p6ilnfda6af15ks3xiz2pr0hkvdvadnk1xm4ahqlf84dld3fnd"; type = "gem"; }; version = "0.6.1"; }; optimist = { + groups = ["default"]; + platforms = []; source = { - remotes = ["http://rubygems.org"]; + remotes = ["https://rubygems.org"]; sha256 = "05jxrp3nbn5iilc1k7ir90mfnwc5abc9h78s5rpm3qafwqxvcj4j"; type = "gem"; }; version = "3.0.0"; }; paint = { + groups = ["default"]; + platforms = []; source = { - remotes = ["http://rubygems.org"]; + remotes = ["https://rubygems.org"]; sha256 = "0ldb269l3pzkihmsws19cr9h3l6naw8c2fqpav8ck3nllnyiv7r2"; type = "gem"; };