mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +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=";
|
hash = "sha256-mzxT6s4ZHShB9tGyyf8jDtVWVEclHPYW+9oKy7v0bC4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Vulkan Header files and API registry";
|
description = "Vulkan Header files and API registry";
|
||||||
homepage = "https://www.lunarg.com";
|
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";
|
pname = "vulkan-loader";
|
||||||
version = "1.3.239.0";
|
version = "1.3.239.0";
|
||||||
|
|
||||||
src = (assert version == vulkan-headers.version;
|
src = fetchFromGitHub {
|
||||||
fetchFromGitHub {
|
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-Loader";
|
repo = "Vulkan-Loader";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
hash = "sha256-4oxynsbFLmsrpI5NEs7gI50g0XVcaUWuZRn6JKB/+hA=";
|
hash = "sha256-4oxynsbFLmsrpI5NEs7gI50g0XVcaUWuZRn6JKB/+hA=";
|
||||||
});
|
};
|
||||||
|
|
||||||
patches = [ ./fix-pkgconfig.patch ];
|
patches = [ ./fix-pkgconfig.patch ];
|
||||||
|
|
||||||
@ -41,5 +40,6 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.ralith ];
|
maintainers = [ maintainers.ralith ];
|
||||||
|
broken = (version != vulkan-headers.version);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -4,14 +4,12 @@ stdenv.mkDerivation rec {
|
|||||||
pname = "spirv-tools";
|
pname = "spirv-tools";
|
||||||
version = "1.3.239.0";
|
version = "1.3.239.0";
|
||||||
|
|
||||||
src = (assert version == spirv-headers.version;
|
src = fetchFromGitHub {
|
||||||
fetchFromGitHub {
|
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "SPIRV-Tools";
|
repo = "SPIRV-Tools";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
hash = "sha256-xLYykbCHb6OH5wUSgheAfReXhxZtI3RqBJ+PxDZx58s=";
|
hash = "sha256-xLYykbCHb6OH5wUSgheAfReXhxZtI3RqBJ+PxDZx58s=";
|
||||||
}
|
};
|
||||||
);
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ];
|
nativeBuildInputs = [ cmake python3 ];
|
||||||
|
|
||||||
@ -43,5 +41,6 @@ stdenv.mkDerivation rec {
|
|||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.ralith ];
|
maintainers = [ maintainers.ralith ];
|
||||||
|
broken = (version != spirv-headers.version);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -30,13 +30,12 @@ stdenv.mkDerivation rec {
|
|||||||
outputs = ["out" "headers"];
|
outputs = ["out" "headers"];
|
||||||
outputInclude = "headers";
|
outputInclude = "headers";
|
||||||
|
|
||||||
src = (assert (lib.all (pkg: pkg.version == version) [vulkan-headers glslang spirv-tools spirv-headers]);
|
src = fetchFromGitHub {
|
||||||
fetchFromGitHub {
|
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-ValidationLayers";
|
repo = "Vulkan-ValidationLayers";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
hash = "sha256-k/A0TaERQAHSM0Fal2IOaRvTz3FV2Go/17P12FSBG1s=";
|
hash = "sha256-k/A0TaERQAHSM0Fal2IOaRvTz3FV2Go/17P12FSBG1s=";
|
||||||
});
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
@ -85,5 +84,6 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.ralith ];
|
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";
|
pname = "vulkan-extension-layer";
|
||||||
version = "1.3.239.0";
|
version = "1.3.239.0";
|
||||||
|
|
||||||
src = (assert version == vulkan-headers.version;
|
src = fetchFromGitHub {
|
||||||
fetchFromGitHub {
|
|
||||||
owner = "KhronosGroup";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-ExtensionLayer";
|
repo = "Vulkan-ExtensionLayer";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
hash = "sha256-0t9HGyiYk3twYQLFCcWsrPiXY1dqjdCadjP4yMLoFwA=";
|
hash = "sha256-0t9HGyiYk3twYQLFCcWsrPiXY1dqjdCadjP4yMLoFwA=";
|
||||||
});
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake jq ];
|
nativeBuildInputs = [ cmake jq ];
|
||||||
|
|
||||||
@ -41,5 +40,6 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ expipiplus1 ];
|
maintainers = with maintainers; [ expipiplus1 ];
|
||||||
|
broken = (version != vulkan-headers.version);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -27,14 +27,13 @@ stdenv.mkDerivation rec {
|
|||||||
# The version must match that in vulkan-headers
|
# The version must match that in vulkan-headers
|
||||||
version = "1.3.239.0";
|
version = "1.3.239.0";
|
||||||
|
|
||||||
src = (assert version == vulkan-headers.version;
|
src = fetchFromGitHub {
|
||||||
fetchFromGitHub {
|
|
||||||
owner = "LunarG";
|
owner = "LunarG";
|
||||||
repo = "VulkanTools";
|
repo = "VulkanTools";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
hash = "sha256-zgkuTy9ccg8D/riA1CM/PnbXW1R0jWEINtcEVilETwk=";
|
hash = "sha256-zgkuTy9ccg8D/riA1CM/PnbXW1R0jWEINtcEVilETwk=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
});
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 jq which pkg-config ];
|
nativeBuildInputs = [ cmake python3 jq which pkg-config ];
|
||||||
|
|
||||||
@ -103,5 +102,6 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.expipiplus1 ];
|
maintainers = [ maintainers.expipiplus1 ];
|
||||||
|
broken = (version != vulkan-headers.version);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -23,16 +23,12 @@ stdenv.mkDerivation rec {
|
|||||||
pname = "vulkan-tools";
|
pname = "vulkan-tools";
|
||||||
version = "1.3.239.0";
|
version = "1.3.239.0";
|
||||||
|
|
||||||
# It's not strictly necessary to have matching versions here, however
|
src = fetchFromGitHub {
|
||||||
# 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";
|
owner = "KhronosGroup";
|
||||||
repo = "Vulkan-Tools";
|
repo = "Vulkan-Tools";
|
||||||
rev = "sdk-${version}";
|
rev = "sdk-${version}";
|
||||||
hash = "sha256-DQGwxTZzS0eATKodMpeJaQdXADvomiqPOspDYoPFZjI=";
|
hash = "sha256-DQGwxTZzS0eATKodMpeJaQdXADvomiqPOspDYoPFZjI=";
|
||||||
});
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
@ -107,5 +103,6 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.ralith ];
|
maintainers = [ maintainers.ralith ];
|
||||||
|
broken = (version != vulkan-headers.version);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user