nixpkgs/pkgs/by-name/gl/glsl_analyzer/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.2 KiB
Nix
Raw Normal View History

2024-03-11 17:24:59 +00:00
{ lib
2024-07-31 19:18:08 +00:00
, stdenv
2024-03-11 17:24:59 +00:00
, fetchFromGitHub
2024-07-31 19:18:08 +00:00
, zig_0_13
, apple-sdk_11
2024-03-11 17:24:59 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
pname = "glsl_analyzer";
2024-07-31 19:18:08 +00:00
version = "1.5.1";
2024-03-11 17:24:59 +00:00
src = fetchFromGitHub {
owner = "nolanderc";
repo = "glsl_analyzer";
rev = "v${finalAttrs.version}";
2024-07-31 19:18:08 +00:00
hash = "sha256-AIzk05T8JZn8HWSI6JDFUIYl4sutd3HR3Zb+xmJll0g=";
2024-03-11 17:24:59 +00:00
};
nativeBuildInputs = [
2024-07-31 19:18:08 +00:00
zig_0_13.hook
2024-03-11 17:24:59 +00:00
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
# The package failed to build on x86_64-darwin because the default was the 10.12 SDK
# Once the default on all platforms has been raised to the 11.0 SDK or higher, this can be removed.
apple-sdk_11
];
2024-03-11 17:24:59 +00:00
postPatch = ''
substituteInPlace build.zig \
--replace-fail 'b.run(&.{ "git", "describe", "--tags", "--always" })' '"${finalAttrs.src.rev}"'
'';
meta = {
description = "Language server for GLSL (OpenGL Shading Language)";
changelog = "https://github.com/nolanderc/glsl_analyzer/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/nolanderc/glsl_analyzer";
mainProgram = "glsl_analyzer";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ wr7 ];
platforms = lib.platforms.unix;
};
})