about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2023-01-08 22:05:55 +0000
committerGitHub <noreply@github.com>2023-01-08 22:05:55 +0000
commitee5bebe027bb1137868dc5b275f1ee5f6f014dc2 (patch)
tree14d0a1135f98ee604aaf2e05dda5d67c515a7817
parent7581ec058e6f9aa48b5e0d0fecda58ef5e9af757 (diff)
parent940f5a5b7277ac4a8f78bd9ae702ec187baf4da6 (diff)
Merge pull request #186455 from wesleyjrz/add-pokemon-colorscripts-mac
-rw-r--r--pkgs/applications/misc/pokemon-colorscripts-mac/default.nix52
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/applications/misc/pokemon-colorscripts-mac/default.nix b/pkgs/applications/misc/pokemon-colorscripts-mac/default.nix
new file mode 100644
index 0000000000000..c795e7f763454
--- /dev/null
+++ b/pkgs/applications/misc/pokemon-colorscripts-mac/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, coreutils
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pokemon-colorscripts-mac";
+  version = "stable=2021-08-10";
+
+  src = fetchFromGitHub {
+    owner = "nuke-dash";
+    repo = "${pname}";
+    rev = "6aa0cd93b255bee35c5716652b8b7dfecb5fcfa2";
+    sha256 = "06b86qy2fpzdd81n2mscc2njkrxx0dyzxpgnm1xk6ldn17c853lc";
+  };
+
+  buildInputs = [ coreutils ];
+
+  preBuild = ''
+    patchShebangs ./install.sh
+
+    # Fix hardcoded prefixed coreutils
+    substituteInPlace pokemon-colorscripts.sh --replace greadlink readlink
+    substituteInPlace pokemon-colorscripts.sh --replace gshuf shuf
+
+    substituteInPlace install.sh --replace /usr/local $out
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/opt
+    mkdir -p $out/bin
+    ./install.sh
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Pokémon colorscripts for the terminal, compatible for mac";
+    longDescription = ''
+      Show colored sprites of pokémons in your terminal.
+      Contains almost 900 pokemon from gen 1 to gen 8.
+      Inspired by DT's colorscripts.
+    '';
+    homepage = "https://github.com/nuke-dash/pokemon-colorscripts-mac";
+    license = licenses.mit;
+    maintainers = [ maintainers.wesleyjrz ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2470aae99a266..fbab1e55ed560 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -28158,6 +28158,8 @@ with pkgs;
 
   cmatrix = callPackage ../applications/misc/cmatrix { };
 
+  pokemon-colorscripts-mac = callPackage ../applications/misc/pokemon-colorscripts-mac { };
+
   cmctl = callPackage ../applications/networking/cluster/cmctl { };
 
   cmus = callPackage ../applications/audio/cmus {