Commit 276b673

HPCesia <me@hpcesia.com>
2026-09-15 05:16:04
dcg: init
1 parent 5a72245
Changed files (3)
pkgs/dcg/default.nix
@@ -0,0 +1,35 @@
+{
+  lib,
+  rustPlatform,
+  fetchFromGitHub,
+  nix-update-script,
+}:
+rustPlatform.buildRustPackage (finalAttrs: {
+  pname = "dcg";
+  version = "0.14.3";
+
+  src = fetchFromGitHub {
+    owner = "Dicklesworthstone";
+    repo = "destructive_command_guard";
+    tag = "v${finalAttrs.version}";
+    hash = "sha256-KkdNrJvqA6jYXyeBcwd+e1wb51n3CHHJP5LDfL3YivM=";
+  };
+
+  cargoHash = "sha256-+rWsM+8ZF1hTixNm8aENwy+jS36IJWIAllUrMUjcDFU=";
+
+  postPatch = ''
+    rm .cargo/config.toml
+  '';
+
+  doCheck = false;
+
+  passthru.updateScript = nix-update-script {};
+
+  meta = {
+    description = "PreToolUse hook that blocks destructive shell commands for AI coding agents";
+    homepage = "https://github.com/Dicklesworthstone/destructive_command_guard";
+    license = lib.licenses.unfree;
+    mainProgram = "dcg";
+    platforms = lib.platforms.unix;
+  };
+})
default.nix
@@ -23,6 +23,8 @@ in rec {
 
   cosmic-enroll = callPackage ./pkgs/cosmic-enroll {};
 
+  dcg = callPackage ./pkgs/dcg {};
+
   dwproton-bin = selfLib.deprecatePackage "dwproton-bin" "use the package of the same name from nixpkgs instead" pkgs.dwproton-bin;
 
   elio = callPackage ./pkgs/elio {};
README.md
@@ -10,6 +10,7 @@
 | Path | Name | Version | License | Description |
 | --- | --- | --- | --- | --- |
 | `cosmic-enroll` | [cosmic-enroll](https://github.com/cosmic-utils/enroll) | `1.2.6` | [MPL-2.0](https://spdx.org/licenses/MPL-2.0.html) | COSMIC GUI for enrolling fingerprints with fprintd |
+| `dcg` | [dcg](https://github.com/Dicklesworthstone/destructive_command_guard) | `0.14.3` | **Unfree** | PreToolUse hook that blocks destructive shell commands for AI coding agents |
 | `elio` | [elio](https://github.com/elio-fm/elio) | `1.12.0` | [MIT](https://spdx.org/licenses/MIT.html) | Snappy, batteries-included terminal file manager with rich previews, inline images, bulk actions, and trash support |
 | `flyline` | [flyline](https://github.com/HalFrgrd/flyline) | `1.8.0` | [GPL-3.0-only](https://spdx.org/licenses/GPL-3.0-only.html) | Bash plugin to replace readline for a modern line editing experience |
 | `gitmal` | [gitmal](https://github.com/antonmedv/gitmal) | `1.0.2` | [MIT](https://spdx.org/licenses/MIT.html) |  A static page generator for repos |