Unverified Commit 307cf250 authored by Michael Daniels's avatar Michael Daniels Committed by GitHub
Browse files

zeekscript: set updateScript to use VERSION file, 1.3.2-unstable-2025-11-10 -> 1.3.2-61 (#466301)

parents b6fd4d08 ee3193c0
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -2,12 +2,12 @@
  lib,
  python3,
  fetchFromGitHub,
  unstableGitUpdater,
  writeScript,
}:

python3.pkgs.buildPythonApplication rec {
  pname = "zeekscript";
  version = "1.3.2-unstable-2025-11-10";
  version = "1.3.2-61";
  pyproject = true;

  src = fetchFromGitHub {
@@ -36,7 +36,18 @@ python3.pkgs.buildPythonApplication rec {
    "zeekscript"
  ];

  passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; };
  passthru.updateScript = writeScript "update-${pname}" ''
    #!/usr/bin/env nix-shell
    #!nix-shell -i bash -p git common-updater-scripts
    tmpdir="$(mktemp -d)"
    git clone "${src.gitRepoUrl}" "$tmpdir"
    pushd "$tmpdir"
    newVersion=$(cat VERSION)
    newRevision=$(git log -s -n 1 --pretty='format:%H' VERSION)
    popd
    rm -rf "$tmpdir"
    update-source-version "${pname}" "$newVersion" --rev="$newRevision"
  '';

  meta = {
    description = "Zeek script formatter and analyzer";