mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
vulkan-headers: add update script
This commit is contained in:
parent
fc46a9d1e2
commit
ee9df2c1a8
@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-mzxT6s4ZHShB9tGyyf8jDtVWVEclHPYW+9oKy7v0bC4=";
|
||||
};
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Vulkan Header files and API registry";
|
||||
homepage = "https://www.lunarg.com";
|
||||
|
23
pkgs/development/libraries/vulkan-headers/update.sh
Executable file
23
pkgs/development/libraries/vulkan-headers/update.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq nix-update
|
||||
|
||||
set -euf -o pipefail
|
||||
|
||||
NEW_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.json | jq -r '.linux')
|
||||
|
||||
VULKAN_SDK_PACKAGES=(
|
||||
"vulkan-headers"
|
||||
"spirv-headers"
|
||||
"glslang"
|
||||
"vulkan-loader"
|
||||
"spirv-tools"
|
||||
"spirv-cross"
|
||||
"vulkan-validation-layers"
|
||||
"vulkan-tools"
|
||||
"vulkan-tools-lunarg"
|
||||
"vulkan-extension-layer"
|
||||
)
|
||||
|
||||
for P in "${VULKAN_SDK_PACKAGES[@]}"; do
|
||||
nix-update "$P" --version "$NEW_VERSION" --commit
|
||||
done
|
@ -5,13 +5,12 @@ stdenv.mkDerivation rec {
|
||||
pname = "vulkan-loader";
|
||||
version = "1.3.239.0";
|
||||
|
||||
src = (assert version == vulkan-headers.version;
|
||||
fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-Loader";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-4oxynsbFLmsrpI5NEs7gI50g0XVcaUWuZRn6JKB/+hA=";
|
||||
});
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-Loader";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-4oxynsbFLmsrpI5NEs7gI50g0XVcaUWuZRn6JKB/+hA=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-pkgconfig.patch ];
|
||||
|
||||
@ -41,5 +40,6 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.unix;
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ralith ];
|
||||
broken = (version != vulkan-headers.version);
|
||||
};
|
||||
}
|
||||
|
@ -4,14 +4,12 @@ stdenv.mkDerivation rec {
|
||||
pname = "spirv-tools";
|
||||
version = "1.3.239.0";
|
||||
|
||||
src = (assert version == spirv-headers.version;
|
||||
fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "SPIRV-Tools";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-xLYykbCHb6OH5wUSgheAfReXhxZtI3RqBJ+PxDZx58s=";
|
||||
}
|
||||
);
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "SPIRV-Tools";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-xLYykbCHb6OH5wUSgheAfReXhxZtI3RqBJ+PxDZx58s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python3 ];
|
||||
|
||||
@ -43,5 +41,6 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.ralith ];
|
||||
broken = (version != spirv-headers.version);
|
||||
};
|
||||
}
|
||||
|
@ -30,13 +30,12 @@ stdenv.mkDerivation rec {
|
||||
outputs = ["out" "headers"];
|
||||
outputInclude = "headers";
|
||||
|
||||
src = (assert (lib.all (pkg: pkg.version == version) [vulkan-headers glslang spirv-tools spirv-headers]);
|
||||
fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-ValidationLayers";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-k/A0TaERQAHSM0Fal2IOaRvTz3FV2Go/17P12FSBG1s=";
|
||||
});
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-ValidationLayers";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-k/A0TaERQAHSM0Fal2IOaRvTz3FV2Go/17P12FSBG1s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
@ -85,5 +84,6 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.linux;
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ralith ];
|
||||
broken = (lib.all (pkg: pkg.version != version) [vulkan-headers glslang spirv-tools spirv-headers]);
|
||||
};
|
||||
}
|
||||
|
@ -4,13 +4,12 @@ stdenv.mkDerivation rec {
|
||||
pname = "vulkan-extension-layer";
|
||||
version = "1.3.239.0";
|
||||
|
||||
src = (assert version == vulkan-headers.version;
|
||||
fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-ExtensionLayer";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-0t9HGyiYk3twYQLFCcWsrPiXY1dqjdCadjP4yMLoFwA=";
|
||||
});
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-ExtensionLayer";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-0t9HGyiYk3twYQLFCcWsrPiXY1dqjdCadjP4yMLoFwA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake jq ];
|
||||
|
||||
@ -41,5 +40,6 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.linux;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ expipiplus1 ];
|
||||
broken = (version != vulkan-headers.version);
|
||||
};
|
||||
}
|
||||
|
@ -27,14 +27,13 @@ stdenv.mkDerivation rec {
|
||||
# The version must match that in vulkan-headers
|
||||
version = "1.3.239.0";
|
||||
|
||||
src = (assert version == vulkan-headers.version;
|
||||
fetchFromGitHub {
|
||||
owner = "LunarG";
|
||||
repo = "VulkanTools";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-zgkuTy9ccg8D/riA1CM/PnbXW1R0jWEINtcEVilETwk=";
|
||||
fetchSubmodules = true;
|
||||
});
|
||||
src = fetchFromGitHub {
|
||||
owner = "LunarG";
|
||||
repo = "VulkanTools";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-zgkuTy9ccg8D/riA1CM/PnbXW1R0jWEINtcEVilETwk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python3 jq which pkg-config ];
|
||||
|
||||
@ -103,5 +102,6 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.linux;
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.expipiplus1 ];
|
||||
broken = (version != vulkan-headers.version);
|
||||
};
|
||||
}
|
||||
|
@ -23,16 +23,12 @@ stdenv.mkDerivation rec {
|
||||
pname = "vulkan-tools";
|
||||
version = "1.3.239.0";
|
||||
|
||||
# It's not strictly necessary to have matching versions here, however
|
||||
# since we're using the SDK version we may as well be consistent with
|
||||
# the rest of nixpkgs.
|
||||
src = (assert (version) == vulkan-headers.version;
|
||||
fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-Tools";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-DQGwxTZzS0eATKodMpeJaQdXADvomiqPOspDYoPFZjI=";
|
||||
});
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-Tools";
|
||||
rev = "sdk-${version}";
|
||||
hash = "sha256-DQGwxTZzS0eATKodMpeJaQdXADvomiqPOspDYoPFZjI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
@ -107,5 +103,6 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.unix;
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ralith ];
|
||||
broken = (version != vulkan-headers.version);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user