about summary refs log tree commit diff
path: root/pkgs/tools/misc/dt-shell-color-scripts
diff options
context:
space:
mode:
authorJakob Neufeld <jakob.n.neufeld@gmail.com>2022-06-07 19:03:56 +0200
committerYour Name <you@example.com>2022-06-15 19:36:55 +0200
commit2ba52d316c66e1778842c3385ee2b058bf351795 (patch)
tree9de9e0daed05161e39e187166e50d43d2e5d09c0 /pkgs/tools/misc/dt-shell-color-scripts
parente1c653af38db729645841de7fc5fd50445446bc2 (diff)
dt-shell-color-scripts: init at unstable-2022-02-22
Diffstat (limited to 'pkgs/tools/misc/dt-shell-color-scripts')
-rw-r--r--pkgs/tools/misc/dt-shell-color-scripts/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/misc/dt-shell-color-scripts/default.nix b/pkgs/tools/misc/dt-shell-color-scripts/default.nix
new file mode 100644
index 0000000000000..6a0b3da4410fb
--- /dev/null
+++ b/pkgs/tools/misc/dt-shell-color-scripts/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, runtimeShell
+, makeWrapper
+}:
+
+stdenv.mkDerivation {
+  pname = "dt-shell-color-scripts";
+  version = "unstable-2022-02-22";
+
+  src = fetchFromGitLab {
+    owner = "dwt1";
+    repo = "shell-color-scripts";
+    rev = "fcd013ea2e1ff80e01adbcea9d0eaf9c73db94c0";
+    sha256 = "sha256-bd3NBf99rCiADUKQb6fzCBDaKBmYaZHcO4qokm/39do=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+    patchShebangs ./colorscript.sh
+    patchShebangs ./colorscripts
+    mkdir -p $out/bin
+    mkdir -p $out/opt/shell-color-scripts/
+    cp -r colorscripts $out/opt/shell-color-scripts/colorscripts
+    chmod +x colorscript.sh
+    cp colorscript.sh $out/bin/colorscript
+    substituteInPlace $out/bin/colorscript \
+      --replace "/opt/shell-color-scripts/colorscripts" "$out/opt/shell-color-scripts/colorscripts"
+    runHook postInstall
+  '';
+
+    meta = with lib; {
+      description = "A collection of shell color scripts collected by dt (Derek Taylor)";
+      homepage = "https://gitlab.com/dwt1/shell-color-scripts";
+      license = with licenses; [ mit ];
+      maintainers = with maintainers; [ drzoidberg ];
+    };
+}