From 17ad5ab0a9bde13c3e97f5be050f32d7c8dd503e Mon Sep 17 00:00:00 2001 From: zimbatm Date: Sun, 21 Feb 2016 18:22:59 +0000 Subject: [PATCH] gist: 4.4.2 -> 4.5.0 Fixes #13158 --- pkgs/tools/text/gist/Gemfile | 2 -- pkgs/tools/text/gist/Gemfile.lock | 10 ---------- pkgs/tools/text/gist/default.nix | 30 +++++++++++++++++++++--------- pkgs/tools/text/gist/gemset.nix | 9 --------- 4 files changed, 21 insertions(+), 30 deletions(-) delete mode 100644 pkgs/tools/text/gist/Gemfile delete mode 100644 pkgs/tools/text/gist/Gemfile.lock delete mode 100644 pkgs/tools/text/gist/gemset.nix diff --git a/pkgs/tools/text/gist/Gemfile b/pkgs/tools/text/gist/Gemfile deleted file mode 100644 index 18500f898f1c..000000000000 --- a/pkgs/tools/text/gist/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source "https://rubygems.org" -gem "gist" diff --git a/pkgs/tools/text/gist/Gemfile.lock b/pkgs/tools/text/gist/Gemfile.lock deleted file mode 100644 index 7414da072ada..000000000000 --- a/pkgs/tools/text/gist/Gemfile.lock +++ /dev/null @@ -1,10 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - gist (4.4.2) - -PLATFORMS - ruby - -DEPENDENCIES - gist diff --git a/pkgs/tools/text/gist/default.nix b/pkgs/tools/text/gist/default.nix index 223ba59eecbe..ca9de0590ca2 100644 --- a/pkgs/tools/text/gist/default.nix +++ b/pkgs/tools/text/gist/default.nix @@ -1,15 +1,27 @@ -{ stdenv, lib, bundlerEnv }: +{ buildRubyGem, lib, ruby, makeWrapper }: + +buildRubyGem rec { + inherit ruby; + name = "${gemName}-${version}"; + gemName = "gist"; + version = "4.5.0"; + sha256 = "0k9bgjdmnr14whmjx6c8d5ak1dpazirj96hk5ds69rl5d9issw0l"; + + buildInputs = [ makeWrapper ]; + + postInstall = '' + # Fix the default ruby wrapper + makeWrapper $out/${ruby.gemPath}/bin/gist $out/bin/gist \ + --set GEM_PATH $out/${ruby.gemPath}:${ruby}/${ruby.gemPath} + ''; + + dontStrip = true; -let version = "4.4.2"; -in bundlerEnv { - name = "gist-${version}"; - gemfile = ./Gemfile; - lockfile = ./Gemfile.lock; - gemset = ./gemset.nix; meta = with lib; { - homepage = "http://defunkt.io/gist/"; description = "upload code to https://gist.github.com (or github enterprise)"; - platforms = platforms.all; + homepage = "http://defunkt.io/gist/"; license = licenses.mit; + maintainers = with maintainers; [ zimbatm ]; + platforms = ruby.meta.platforms; }; } diff --git a/pkgs/tools/text/gist/gemset.nix b/pkgs/tools/text/gist/gemset.nix deleted file mode 100644 index 961f96dcb97f..000000000000 --- a/pkgs/tools/text/gist/gemset.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - "gist" = { - version = "4.4.2"; - source = { - type = "gem"; - sha256 = "0lr4rywpm549llk0ypdpb3sjdpqw9snzwzqc3dggg8qn5wj69k81"; - }; - }; -} \ No newline at end of file