transcrypt: 1.1.0 -> 2.2.3

transcrypt: removed `sha256` from hash

transcrypt: `installCheckPhase` -> `passthru`
This commit is contained in:
kashw2 2023-08-05 19:44:53 +10:00
parent 48112c1e54
commit e95ba1eb1a
2 changed files with 9 additions and 42 deletions

View file

@ -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 = ''

View file

@ -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