libvirt: add passthru update script

main
Ilan Joselevich 2 years ago
parent c8b8ea8232
commit e86e7ee1a8
  1. 14
      pkgs/development/libraries/libvirt/default.nix
  2. 2
      pkgs/development/python-modules/libvirt/default.nix

@ -35,6 +35,7 @@
, stdenv
, xhtml1
, yajl
, writeScript
# Linux
, acl ? null
@ -326,6 +327,19 @@ stdenv.mkDerivation rec {
--prefix PATH : /run/libvirt/nix-emulators:${binPath}
'';
passthru.updateScript = writeScript "update-libvirt" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eu -o pipefail
libvirtVersion=$(curl https://gitlab.com/api/v4/projects/192693/repository/tags | jq -r '.[].name|select(. | contains("rc") | not)' | head -n1 | sed "s/v//g")
sysvirtVersion=$(curl https://gitlab.com/api/v4/projects/192677/repository/tags | jq -r '.[].name|select(. | contains("rc") | not)' | head -n1 | sed "s/v//g")
update-source-version ${pname} "$libvirtVersion"
update-source-version python3Packages.${pname} "$libvirtVersion"
update-source-version perlPackages.SysVirt "$sysvirtVersion" --file="pkgs/top-level/perl-packages.nix"
'';
meta = {
homepage = "https://libvirt.org/";
description = ''

@ -4,7 +4,7 @@ buildPythonPackage rec {
pname = "libvirt";
version = "8.1.0";
src = assert version == libvirt.version; fetchFromGitLab {
src = fetchFromGitLab {
owner = "libvirt";
repo = "libvirt-python";
rev = "v${version}";

Loading…
Cancel
Save