about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/papertrail
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/tools/text/papertrail
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/tools/text/papertrail')
-rwxr-xr-xnixpkgs/pkgs/tools/text/papertrail/Gemfile4
-rw-r--r--nixpkgs/pkgs/tools/text/papertrail/Gemfile.lock17
-rw-r--r--nixpkgs/pkgs/tools/text/papertrail/default.nix21
-rw-r--r--nixpkgs/pkgs/tools/text/papertrail/gemset.nix26
-rw-r--r--nixpkgs/pkgs/tools/text/papertrail/shell.nix19
5 files changed, 87 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/text/papertrail/Gemfile b/nixpkgs/pkgs/tools/text/papertrail/Gemfile
new file mode 100755
index 000000000000..199cd1422aaa
--- /dev/null
+++ b/nixpkgs/pkgs/tools/text/papertrail/Gemfile
@@ -0,0 +1,4 @@
+# frozen_string_literal: true
+source "https://rubygems.org"
+
+gem "papertrail"
diff --git a/nixpkgs/pkgs/tools/text/papertrail/Gemfile.lock b/nixpkgs/pkgs/tools/text/papertrail/Gemfile.lock
new file mode 100644
index 000000000000..0d1b2a6fbe6d
--- /dev/null
+++ b/nixpkgs/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
diff --git a/nixpkgs/pkgs/tools/text/papertrail/default.nix b/nixpkgs/pkgs/tools/text/papertrail/default.nix
new file mode 100644
index 000000000000..a02ca1cd3dde
--- /dev/null
+++ b/nixpkgs/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
+  '';
+}
diff --git a/nixpkgs/pkgs/tools/text/papertrail/gemset.nix b/nixpkgs/pkgs/tools/text/papertrail/gemset.nix
new file mode 100644
index 000000000000..91bfe3198963
--- /dev/null
+++ b/nixpkgs/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";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/tools/text/papertrail/shell.nix b/nixpkgs/pkgs/tools/text/papertrail/shell.nix
new file mode 100644
index 000000000000..55a7a18f57b1
--- /dev/null
+++ b/nixpkgs/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
+  '';
+}