about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/stag/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/stag/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/stag/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/stag/default.nix b/nixpkgs/pkgs/applications/misc/stag/default.nix
new file mode 100644
index 000000000000..049cee5a830d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/stag/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, curses, fetchpatch }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "stag";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "seenaburns";
+    repo = "stag";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-O3iHTsaFs1l9sQV7hOoh4F+w3t28JCNlwT33zBmUP/s=";
+  };
+
+  patches = [
+    # fix compilation on aarch64 https://github.com/seenaburns/stag/pull/19
+    (fetchpatch {
+      url = "https://github.com/seenaburns/stag/commit/0a5a8533d0027b2ee38d109adb0cb7d65d171497.diff";
+      hash = "sha256-fqcsStduL3qfsp5wLJ0GLfEz0JRnOqsvpXB4gdWwVzg=";
+    })
+  ];
+
+  buildInputs = [ curses ];
+
+  installPhase = ''
+    make install PREFIX=$out
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/seenaburns/stag";
+    description = "Terminal streaming bar graph passed through stdin";
+    license = licenses.bsdOriginal;
+    maintainers = with maintainers; [ matthiasbeyer ];
+    platforms = platforms.unix;
+    mainProgram = "stag";
+  };
+})