Unverified Commit 76780d3c authored by Adam C. Stephens's avatar Adam C. Stephens Committed by GitHub
Browse files

Merge pull request #324015 from adamcstephens/lxd/5.21.1

lxd-unwrapped-lts: 5.21.0 -> 5.21.1
parents 2bdf0bdc 18d39ece
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  pkg-config,
  lxc,
  buildGo122Module,
  fetchurl,
  fetchFromGitHub,
  acl,
  libcap,
  dqlite,
@@ -13,21 +13,22 @@
  udev,
  installShellFiles,
  nixosTests,
  gitUpdater,
  callPackage,
  nix-update-script,
}:

buildGo122Module rec {
  pname = "lxd-unwrapped-lts";
  # major/minor are used in updateScript to pin to LTS
  version = "5.21.0";
  version = "5.21.1";

  src = fetchurl {
    url = "https://github.com/canonical/lxd/releases/download/lxd-${version}/lxd-${version}.tar.gz";
    hash = "sha256-vnh+8Jm4Olg+VdAPpGboLSbChdnwsU84IgyzGe4ltg8=";
  src = fetchFromGitHub {
    owner = "canonical";
    repo = "lxd";
    rev = "refs/tags/lxd-${version}";
    hash = "sha256-6php6dThpyADOY+2PZ38WxK2jPKd61D0OCwTKjAhAUg=";
  };

  vendorHash = null;
  vendorHash = "sha256-iGW2FQjuqANadFuMHa+2VXiUgoU0VFBJYUyh0pMIdWY=";

  postPatch = ''
    substituteInPlace shared/usbid/load.go \
@@ -87,11 +88,16 @@ buildGo122Module rec {
    installShellCompletion --bash --name lxd ./scripts/bash/lxd-client
  '';

  passthru.tests.lxd = nixosTests.lxd;
  passthru.tests.lxd-to-incus = nixosTests.incus.lxd-to-incus;
  passthru.updateScript = gitUpdater {
    url = "https://github.com/canonical/lxd.git";
    rev-prefix = "lxd-5.21";
  passthru = {
    tests.lxd = nixosTests.lxd;
    tests.lxd-to-incus = nixosTests.incus.lxd-to-incus;

    updateScript = nix-update-script {
      extraArgs = [
        "--version-regex"
        "lxd-(5.21.*)"
      ];
    };
  };

  meta = with lib; {