about summary refs log tree commit diff
path: root/pkgs/tools/security/enc/default.nix
diff options
context:
space:
mode:
authorTobias Ravenstein <github@rvnstn.de>2023-02-10 18:14:44 +0100
committerTobias Ravenstein <github@rvnstn.de>2023-02-13 12:01:52 +0100
commit0fb0adfe7b5f7ab124a09343736ff70c4e0518cf (patch)
treea6df1700c6f0b0be5aa7b3a9c242b22e9f9c6e08 /pkgs/tools/security/enc/default.nix
parent571de3804ff764e3b37a578853e83589fa4f552b (diff)
downloadnixlib-0fb0adfe7b5f7ab124a09343736ff70c4e0518cf.tar
nixlib-0fb0adfe7b5f7ab124a09343736ff70c4e0518cf.tar.gz
nixlib-0fb0adfe7b5f7ab124a09343736ff70c4e0518cf.tar.bz2
nixlib-0fb0adfe7b5f7ab124a09343736ff70c4e0518cf.tar.lz
nixlib-0fb0adfe7b5f7ab124a09343736ff70c4e0518cf.tar.xz
nixlib-0fb0adfe7b5f7ab124a09343736ff70c4e0518cf.tar.zst
nixlib-0fb0adfe7b5f7ab124a09343736ff70c4e0518cf.zip
enc: init at 1.1.0
Diffstat (limited to 'pkgs/tools/security/enc/default.nix')
-rw-r--r--pkgs/tools/security/enc/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/tools/security/enc/default.nix b/pkgs/tools/security/enc/default.nix
new file mode 100644
index 000000000000..00d6d0211f80
--- /dev/null
+++ b/pkgs/tools/security/enc/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, git
+, installShellFiles
+}:
+
+buildGoModule rec {
+  pname = "enc";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "life4";
+    repo = "enc";
+    rev = "v${version}";
+    sha256 = "Tt+J/MnYJNewSl5UeewS0b47NGW2yzfcVHA5+9UQWSs=";
+  };
+  vendorSha256 = "lB6GkE6prfBG7OCOJ1gm23Ee5+nAgmJg8I9Nqe1fsRw=";
+
+  proxyVendor = true;
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  subPackages = ".";
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/life4/enc/version.GitCommit=${version}"
+  ];
+
+  nativeCheckInputs = [ git ];
+
+  postInstall = ''
+    installShellCompletion --cmd enc \
+      --bash <($out/bin/enc completion bash) \
+      --fish <($out/bin/enc completion fish) \
+      --zsh <($out/bin/enc completion zsh)
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/life4/enc";
+    changelog = "https://github.com/life4/enc/releases/tag/v${version}";
+    description = "A modern and friendly alternative to GnuPG";
+    longDescription = ''
+      Enc is a CLI tool for encryption, a modern and friendly alternative to GnuPG.
+      It is easy to use, secure by default and can encrypt and decrypt files using password or encryption keys,
+      manage and download keys, and sign data.
+      Our goal was to make encryption available to all engineers without the need to learn a lot of new words, concepts,
+      and commands. It is the most beginner-friendly CLI tool for encryption, and keeping it that way is our top priority.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ rvnstn ];
+  };
+}