]> git.scottworley.com Git - auto-upgrade-with-pinch/blobdiff - overlays/keyedgpg.nix
Use local pkgs instead of overlays
[auto-upgrade-with-pinch] / overlays / keyedgpg.nix
diff --git a/overlays/keyedgpg.nix b/overlays/keyedgpg.nix
deleted file mode 100644 (file)
index a78062f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# Following the instructions at https://tribut.de/blog/git-commit-signatures-trusted-keys
-# Use with git with -c gpg.program='keyedgpg /path/to/keyfile.asc'
-
-self: super:
-let
-  homelessGPG = super.writeShellScript "homeless-gpg" ''
-    set -eo pipefail
-
-    export GNUPGHOME=$(${self.coreutils}/bin/mktemp -d)
-    trap '${self.coreutils}/bin/rm -r "$GNUPGHOME"' EXIT
-    ${self.gnupg}/bin/gpg --no-default-keyring "$@"
-  '';
-in {
-  keyedgpg = keyfiles: super.writeShellScript "keyed-gpg" ''
-    set -eo pipefail
-
-    keyring=$(${self.coreutils}/bin/mktemp)
-    cleanup() { ${self.coreutils}/bin/rm "$keyring"; }
-    trap cleanup EXIT
-    ${homelessGPG} --keyring="$keyring" --import ${self.lib.escapeShellArgs keyfiles}
-
-    trusted_key_args=()
-    while read keyid;do
-      trusted_key_args+=( --trusted-key "$keyid" )
-    done < <(
-      ${homelessGPG} --with-colons --show-keys ${self.lib.escapeShellArgs keyfiles} |
-        ${self.gawk}/bin/awk -F: '$1 == "pub" { print $5 }')
-
-    ${homelessGPG} --keyring="$keyring" "''${trusted_key_args[@]}" "$@"
-  '';
-}