Skip to content

Commit

Permalink
add papertrail at 0.10.1
Browse files Browse the repository at this point in the history
Thank you @grahamc <3
  • Loading branch information
domenkozar committed Apr 24, 2017
1 parent 125cf35 commit 9f11d17
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/tools/text/papertrail/Gemfile
@@ -0,0 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem "papertrail"
17 changes: 17 additions & 0 deletions pkgs/tools/text/papertrail/Gemfile.lock
@@ -0,0 +1,17 @@
GEM
remote: https://rubygems.org/
specs:
ansi (1.5.0)
chronic (0.10.2)
papertrail (0.10.1)
ansi (~> 1.5)
chronic (~> 0.10)

PLATFORMS
ruby

DEPENDENCIES
papertrail

BUNDLED WITH
1.14.4
21 changes: 21 additions & 0 deletions pkgs/tools/text/papertrail/default.nix
@@ -0,0 +1,21 @@
{ stdenv, bundlerEnv, ruby}:

let
# To update, just run `nix-shell` in this directory.
papertrail-env = bundlerEnv rec {
name = "papertrail-env";
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in stdenv.mkDerivation {
name = "papertrail-${(import ./gemset.nix).papertrail.version}";

phases = [ "installPhase" ];

installPhase = ''
mkdir -p $out/bin
ln -s ${papertrail-env}/bin/papertrail $out/bin/papertrail
'';
}
26 changes: 26 additions & 0 deletions pkgs/tools/text/papertrail/gemset.nix
@@ -0,0 +1,26 @@
{
ansi = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "14ims9zfal4gs2wpx2m5rd8zsrl2k794d359shkrsgg3fhr2a22l";
type = "gem";
};
version = "1.5.0";
};
chronic = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1hrdkn4g8x7dlzxwb1rfgr8kw3bp4ywg5l4y4i9c2g5cwv62yvvn";
type = "gem";
};
version = "0.10.2";
};
papertrail = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0vb7bh7qh5hr4v3w711bl0yrr3rlhz5c3h3qx3fq31dr5y4100v7";
type = "gem";
};
version = "0.10.1";
};
}
19 changes: 19 additions & 0 deletions pkgs/tools/text/papertrail/shell.nix
@@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> {} }:

pkgs.stdenv.mkDerivation {
name = "papertrail";
src = ./.;

buildInputs = with pkgs; [
bundix
bundler
ruby
];

shellHook = ''
truncate --size 0 Gemfile.lock
bundle install --path=vendor/bundle
rm -rf vendor .bundle
bundix
'';
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -3378,6 +3378,8 @@ with pkgs;
paper-gtk-theme = callPackage ../misc/themes/paper { };

paperwork = callPackage ../applications/office/paperwork { };

papertrail = callPackage ../tools/text/papertrail { };

par2cmdline = callPackage ../tools/networking/par2cmdline { };

Expand Down

0 comments on commit 9f11d17

Please sign in to comment.