emacsPackage.el-easydraw: fix passthru.updateScript
Use the same update script that is inlined in some other manual package derivations as has an incompatible version string format.
This commit is contained in:
+14
-2
@@ -2,7 +2,7 @@
|
||||
, melpaBuild
|
||||
, fetchFromGitHub
|
||||
, writeText
|
||||
, unstableGitUpdater
|
||||
, writeScript
|
||||
, gzip
|
||||
}:
|
||||
|
||||
@@ -33,7 +33,19 @@ melpaBuild {
|
||||
"msg"))
|
||||
'';
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { };
|
||||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts coreutils git gnused
|
||||
set -eu -o pipefail
|
||||
tmpdir="$(mktemp -d)"
|
||||
git clone --depth=1 https://github.com/misohena/el-easydraw.git "$tmpdir"
|
||||
pushd "$tmpdir"
|
||||
commit=$(git show -s --pretty='format:%H')
|
||||
# Based on: https://github.com/melpa/melpa/blob/2d8716906a0c9e18d6c979d8450bf1d15dd785eb/package-build/package-build.el#L523-L533
|
||||
version=$(TZ=UTC git show -s --pretty='format:%cd' --date='format-local:%Y%m%d.%H%M' | sed 's|\.0*|.|')
|
||||
popd
|
||||
update-source-version emacsPackages.el-easydraw $version --rev="$commit"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/misohena/el-easydraw";
|
||||
|
||||
Reference in New Issue
Block a user