mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
mailpit: fix passthru.updateScript
This commit is contained in:
parent
4d67eb3b7b
commit
063251a83f
@ -28,7 +28,7 @@ TMP="$(mktemp -d)"
|
|||||||
trap 'rm -rf "$TMP"' exit
|
trap 'rm -rf "$TMP"' exit
|
||||||
|
|
||||||
NIXPKGS_MAILPIT_PATH=$(cd $(dirname ${BASH_SOURCE[0]}); pwd -P)/
|
NIXPKGS_MAILPIT_PATH=$(cd $(dirname ${BASH_SOURCE[0]}); pwd -P)/
|
||||||
VERSIONS_NIX="$NIXPKGS_MAILPIT_PATH/versions.nix"
|
SOURCE_NIX="$NIXPKGS_MAILPIT_PATH/source.nix"
|
||||||
|
|
||||||
PREFETCH_JSON=$TMP/prefetch.json
|
PREFETCH_JSON=$TMP/prefetch.json
|
||||||
nix-prefetch-git --rev "$TARGET_TAG" --url "https://github.com/$OWNER/$REPO" > "$PREFETCH_JSON"
|
nix-prefetch-git --rev "$TARGET_TAG" --url "https://github.com/$OWNER/$REPO" > "$PREFETCH_JSON"
|
||||||
@ -38,7 +38,7 @@ NPM_DEPS_HASH="$(prefetch-npm-deps $PREFETCH_PATH/package-lock.json)"
|
|||||||
|
|
||||||
FAKE_HASH="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
FAKE_HASH="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||||
|
|
||||||
cat > $VERSIONS_NIX <<-EOF
|
cat > $SOURCE_NIX <<-EOF
|
||||||
{
|
{
|
||||||
version = "$TARGET_VERSION";
|
version = "$TARGET_VERSION";
|
||||||
hash = "$PREFETCH_HASH";
|
hash = "$PREFETCH_HASH";
|
||||||
@ -50,7 +50,7 @@ EOF
|
|||||||
GO_HASH="$(nix-instantiate --eval -A mailpit.vendorHash | tr -d '"')"
|
GO_HASH="$(nix-instantiate --eval -A mailpit.vendorHash | tr -d '"')"
|
||||||
VENDOR_HASH=$(extractVendorHash "$GO_HASH")
|
VENDOR_HASH=$(extractVendorHash "$GO_HASH")
|
||||||
|
|
||||||
cat > $VERSIONS_NIX <<-EOF
|
cat > $SOURCE_NIX <<-EOF
|
||||||
{
|
{
|
||||||
version = "$TARGET_VERSION";
|
version = "$TARGET_VERSION";
|
||||||
hash = "$PREFETCH_HASH";
|
hash = "$PREFETCH_HASH";
|
||||||
@ -68,6 +68,6 @@ cat <<-EOF
|
|||||||
"attrPath": "$UPDATE_NIX_ATTR_PATH",
|
"attrPath": "$UPDATE_NIX_ATTR_PATH",
|
||||||
"oldVersion": "$UPDATE_NIX_OLD_VERSION",
|
"oldVersion": "$UPDATE_NIX_OLD_VERSION",
|
||||||
"newVersion": "$TARGET_VERSION",
|
"newVersion": "$TARGET_VERSION",
|
||||||
"files": ["$VERSIONS_NIX"]
|
"files": ["$SOURCE_NIX"]
|
||||||
}]
|
}]
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user