summary refs log tree commit diff
path: root/pkgs/tools/misc/tewisay
diff options
context:
space:
mode:
authorチルノ <30435868+Chiiruno@users.noreply.github.com>2018-01-21 16:31:51 -0600
committerJörg Thalheim <Mic92@users.noreply.github.com>2018-01-21 22:31:51 +0000
commitb23e92eac104d7d77183a43437f4c04cd4a13e67 (patch)
treee2b9e4e2c78b5994311146ba4eecc15ec3f11f49 /pkgs/tools/misc/tewisay
parente36a3623e9fef792a63faa0df49b47ed66cc36a6 (diff)
downloadnixpkgs-b23e92eac104d7d77183a43437f4c04cd4a13e67.tar
nixpkgs-b23e92eac104d7d77183a43437f4c04cd4a13e67.tar.gz
nixpkgs-b23e92eac104d7d77183a43437f4c04cd4a13e67.tar.bz2
nixpkgs-b23e92eac104d7d77183a43437f4c04cd4a13e67.tar.lz
nixpkgs-b23e92eac104d7d77183a43437f4c04cd4a13e67.tar.xz
nixpkgs-b23e92eac104d7d77183a43437f4c04cd4a13e67.tar.zst
nixpkgs-b23e92eac104d7d77183a43437f4c04cd4a13e67.zip
tewisay: init at git-2017-04-14 (#33488)
Diffstat (limited to 'pkgs/tools/misc/tewisay')
-rw-r--r--pkgs/tools/misc/tewisay/default.nix36
-rw-r--r--pkgs/tools/misc/tewisay/deps.nix21
2 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/misc/tewisay/default.nix b/pkgs/tools/misc/tewisay/default.nix
new file mode 100644
index 00000000000..2d713ae3821
--- /dev/null
+++ b/pkgs/tools/misc/tewisay/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper }:
+
+buildGoPackage rec {
+  name = "tewisay-unstable-${version}";
+  version = "2017-04-14";
+
+  goPackagePath = "github.com/lucy/tewisay";
+
+  src = fetchFromGitHub {
+    owner = "lucy";
+    repo = "tewisay";
+    rev = "e3fc38737cedb79d93b8cee07207c6c86db4e488";
+    sha256 = "1na3xi4z90v8qydcvd3454ia9jg7qhinciy6kvgyz61q837cw5dk";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  goDeps = ./deps.nix;
+
+  postInstall = ''
+    install -D -t $bin/share/tewisay/cows go/src/${goPackagePath}/cows/*.cow
+  '';
+
+  preFixup = ''
+    wrapProgram $bin/bin/tewisay \
+      --prefix COWPATH : $bin/share/tewisay/cows
+  '';
+
+  meta = {
+    homepage = https://github.com/lucy/tewisay;
+    description = "Cowsay replacement with unicode and partial ansi escape support";
+    license = stdenv.lib.licenses.cc0;
+    maintainers = [ stdenv.lib.maintainers.chiiruno ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/tools/misc/tewisay/deps.nix b/pkgs/tools/misc/tewisay/deps.nix
new file mode 100644
index 00000000000..b6b1356dcf8
--- /dev/null
+++ b/pkgs/tools/misc/tewisay/deps.nix
@@ -0,0 +1,21 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/mattn/go-runewidth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-runewidth";
+      rev = "97311d9f7767e3d6f422ea06661bc2c7a19e8a5d";
+      sha256 = "0dxlrzn570xl7gb11hjy1v4p3gw3r41yvqhrffgw95ha3q9p50cg";
+    };
+  }
+  {
+    goPackagePath = "github.com/ogier/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/ogier/pflag";
+      rev = "45c278ab3607870051a2ea9040bb85fcb8557481";
+      sha256 = "0620v75wppfd84d95n312wpngcb73cph4q3ivs1h0waljfnsrd5l";
+    };
+  }
+]