about summary refs log tree commit diff
path: root/pkgs/applications/version-management/transcrypt
diff options
context:
space:
mode:
authorkashw2 <supra4keanu@hotmail.com>2023-08-05 19:44:53 +1000
committerkashw2 <supra4keanu@hotmail.com>2023-08-28 18:25:17 +1000
commite95ba1eb1a24c3dd6487e24073729fc78e9356ac (patch)
tree54cc11ea4b49fd5dc5f08e6198bed3255beaa075 /pkgs/applications/version-management/transcrypt
parent48112c1e542fd0a76b83ead9858df806b78ae294 (diff)
transcrypt: 1.1.0 -> 2.2.3
transcrypt: removed `sha256` from hash

transcrypt: `installCheckPhase` -> `passthru`
Diffstat (limited to 'pkgs/applications/version-management/transcrypt')
-rw-r--r--pkgs/applications/version-management/transcrypt/default.nix14
-rw-r--r--pkgs/applications/version-management/transcrypt/helper-scripts_depspathprefix.patch37
2 files changed, 9 insertions, 42 deletions
diff --git a/pkgs/applications/version-management/transcrypt/default.nix b/pkgs/applications/version-management/transcrypt/default.nix
index 3225744abc57c..5000037b0c8af 100644
--- a/pkgs/applications/version-management/transcrypt/default.nix
+++ b/pkgs/applications/version-management/transcrypt/default.nix
@@ -1,21 +1,19 @@
-{ lib, stdenv, fetchFromGitHub, git, makeWrapper, openssl, coreutils, util-linux, gnugrep, gnused, gawk }:
+{ lib, stdenv, fetchFromGitHub, git, makeWrapper, openssl, coreutils, util-linux, gnugrep, gnused, gawk, testers, transcrypt }:
 
 stdenv.mkDerivation rec {
   pname = "transcrypt";
-  version = "1.1.0";
+  version = "2.2.3";
 
   src = fetchFromGitHub {
     owner = "elasticdog";
     repo = "transcrypt";
     rev = "v${version}";
-    sha256 = "1dkr69plk16wllk5bzlkchrzw63pk239dgbjhrb3mb61i065jdam";
+    sha256 = "+B8CYHDneDd0GwiTwQK6YVScDMKao2JXFpGk9PY6/EE=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ git openssl coreutils util-linux gnugrep gnused gawk ];
 
-  patches = [ ./helper-scripts_depspathprefix.patch ];
-
   installPhase = ''
     install -m 755 -D transcrypt $out/bin/transcrypt
     install -m 644 -D man/transcrypt.1 $out/share/man/man1/transcrypt.1
@@ -32,6 +30,12 @@ stdenv.mkDerivation rec {
     chmod +x $out/bin/transcrypt-depspathprefix
   '';
 
+  passthru.tests.version = testers.testVersion {
+    package = transcrypt;
+    command = "transcrypt --version";
+    version = "transcrypt ${version}";
+  };
+
   meta = with lib; {
     description = "Transparently encrypt files within a Git repository";
     longDescription = ''
diff --git a/pkgs/applications/version-management/transcrypt/helper-scripts_depspathprefix.patch b/pkgs/applications/version-management/transcrypt/helper-scripts_depspathprefix.patch
deleted file mode 100644
index 925aadab3dd59..0000000000000
--- a/pkgs/applications/version-management/transcrypt/helper-scripts_depspathprefix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/transcrypt b/transcrypt
-index a0b562d..7888f5d 100755
---- a/transcrypt
-+++ b/transcrypt
-@@ -278,6 +278,7 @@ save_helper_scripts() {
- 
- 	cat <<-'EOF' > "${GIT_DIR}/crypt/clean"
- 		#!/usr/bin/env bash
-+		PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH"
- 		filename=$1
- 		# ignore empty files
- 		if [[ -s $filename ]]; then
-@@ -300,6 +301,7 @@ save_helper_scripts() {
- 
- 	cat <<-'EOF' > "${GIT_DIR}/crypt/smudge"
- 		#!/usr/bin/env bash
-+		PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH"
- 		tempfile=$(mktemp 2> /dev/null || mktemp -t tmp)
- 		trap 'rm -f "$tempfile"' EXIT
- 		cipher=$(git config --get --local transcrypt.cipher)
-@@ -309,6 +311,7 @@ save_helper_scripts() {
- 
- 	cat <<-'EOF' > "${GIT_DIR}/crypt/textconv"
- 		#!/usr/bin/env bash
-+		PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH"
- 		filename=$1
- 		# ignore empty files
- 		if [[ -s $filename ]]; then
-@@ -351,7 +354,7 @@ save_configuration() {
- 	git config merge.renormalize 'true'
- 
- 	# add a git alias for listing encrypted files
--	git config alias.ls-crypt "!git ls-files | git check-attr --stdin filter | awk 'BEGIN { FS = \":\" }; /crypt$/{ print \$1 }'"
-+	git config alias.ls-crypt "!PATH=\"\$(transcrypt-depspathprefix 2>/dev/null)\$PATH\"; git ls-files | git check-attr --stdin filter | awk 'BEGIN { FS = \":\" }; /crypt$/{ print \$1 }'"
- }
- 
- # display the current configuration settings