Merge pull request #191523 from jtojnar/subl-name

sublime{4-dev,-merge}: Fix updateScript and update
This commit is contained in:
Jan Tojnar 2022-09-18 23:32:57 +02:00 committed by GitHub
commit 634e42c507
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 13 deletions

View File

@ -116,7 +116,7 @@ in stdenv.mkDerivation (rec {
makeWrapper "''$${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
'' + builtins.concatStringsSep "" (map (binaryAlias: "ln -s $out/bin/${primaryBinary} $out/bin/${binaryAlias}\n") primaryBinaryAliases) + ''
mkdir -p "$out/share/applications"
substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "${primaryBinary}"
for directory in ''$${primaryBinary}/Icon/*; do
size=$(basename $directory)
mkdir -p "$out/share/icons/hicolor/$size/apps"

View File

@ -11,9 +11,9 @@ in
} {};
sublime4-dev = common {
buildVersion = "4134";
buildVersion = "4136";
dev = true;
x64sha256 = "rd3EG8e13FsPKihSM9qjUMRsEA6joMwVqhj1NZlwIaE=";
aarch64sha256 = "gdfEDd2E1sew08sVmcmw21zyil8JuJJMpG2T/9Pi81E=";
x64sha256 = "6cSaF8seS3XpXpoaROO5tpVuwJzE+z1kzwxNlOUadj0=";
aarch64sha256 = "Mtib8i29FCFutRXmWPQSp9h/FcLD7+wv+tGAjwf9d3w=";
} {};
}

View File

@ -98,7 +98,7 @@ in stdenv.mkDerivation (rec {
makeWrapper "''$${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
'' + builtins.concatStringsSep "" (map (binaryAlias: "ln -s $out/bin/${primaryBinary} $out/bin/${binaryAlias}\n") primaryBinaryAliases) + ''
mkdir -p "$out/share/applications"
substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "$out/bin/${primaryBinary}"
substitute "''$${primaryBinary}/${primaryBinary}.desktop" "$out/share/applications/${primaryBinary}.desktop" --replace "/opt/${primaryBinary}/${primaryBinary}" "${primaryBinary}"
for directory in ''$${primaryBinary}/Icon/*; do
size=$(basename $directory)
mkdir -p "$out/share/icons/hicolor/$size/apps"

View File

@ -4,8 +4,8 @@ let
common = opts: callPackage (import ./common.nix opts);
in {
sublime-merge = common {
buildVersion = "2074";
x64sha256 = "REo59Lpi0fmAOp0XJa4Iln3VKxR5kRiMpz2zfqz1MQs=";
buildVersion = "2077";
x64sha256 = "6xgh/oSatTYHCnQEXiZAoHs3yI1iimLMtzCosBKBVp8=";
} {};
sublime-merge-dev = common {

View File

@ -177,15 +177,15 @@ elif [[ "$oldHashAlgo" = "null" ]]; then
fi
case "$oldHashAlgo" in
# Lengths of hex-encoded hashes
sha256) hashLength=64 ;;
sha512) hashLength=128 ;;
# Choose a temporary hash for given algorithm.
# Not using all-zeroes hash, since that is sometimes
# used for clean-up when updating multi-source packages.
# Created by hashing “update-source-version” string.
sha256) tempHash=AzH1rZFqEH8sovZZfJykvsEmCedEZWigQFHWHl6/PdE= ;;
sha512) tempHash=KFj9Fvco4AuCgLJIGRnVzyssRf7VGP2oi5CkH6ADvj75ow3am3h8pxefOgQlO+i33Q/BBnG/ST/F7B/0BvWHxw== ;;
*) die "Unhandled hash algorithm '$oldHashAlgo' in '$attr'!" ;;
esac
# Make a temporary all-zeroes hash of $hashLength characters
tempHash=$(printf '%0*d' "$hashLength" 0)
if [[ -n "$sri" ]]; then
# SRI hashes only support base64
# SRI hashes need to declare the hash type as part of the hash