vinegar: 1.7.8 -> 1.8.1 (#380662)

This commit is contained in:
Peder Bergebakken Sundt
2025-02-17 02:33:50 +01:00
committed by GitHub
+124 -38
View File
@@ -1,81 +1,167 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchurl,
pkg-config,
xorg,
wayland,
vulkan-headers,
wine64Packages,
fetchpatch,
fetchFromGitHub,
glib,
makeBinaryWrapper,
pkg-config,
cairo,
gdk-pixbuf,
graphene,
gtk4,
libadwaita,
libGL,
libxkbcommon,
makeBinaryWrapper,
pango,
vulkan-headers,
vulkan-loader,
wayland,
winetricks,
xorg,
symlinkJoin,
nix-update-script,
}:
let
wine = (wine64Packages.staging.override { embedInstallers = true; }).overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
(fetchurl {
name = "loader-prefer-winedllpath.patch";
url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/3e07606350d803fa386eb4c358836a230819380d/patches/wine/loader-prefer-winedllpath.patch";
hash = "sha256-89wnr2rIbyw490hHwckB9g1GKCXm6BERnplfwEUlNOg=";
})
];
});
wine =
(wine64Packages.staging.override {
dbusSupport = true;
embedInstallers = true;
pulseaudioSupport = true;
x11Support = true;
waylandSupport = true;
}).overrideAttrs
(oldAttrs: {
# https://github.com/flathub/org.vinegarhq.Vinegar/blob/a3c2f1249dec9548bd870027f55edcc58343b685/wine.yml#L31-L38
# --with-wayland is added by waylandSupport = true;
configureFlags = oldAttrs.configureFlags or [ ] ++ [
"--disable-tests"
"--disable-win16"
"--with-dbus"
"--with-pulse"
"--with-x"
"--without-oss"
];
patches = oldAttrs.patches or [ ] ++ [
(fetchpatch {
name = "loader-prefer-winedllpath.patch";
url = "https://raw.githubusercontent.com/flathub/org.vinegarhq.Vinegar/3e07606350d803fa386eb4c358836a230819380d/patches/wine/loader-prefer-winedllpath.patch";
hash = "sha256-89wnr2rIbyw490hHwckB9g1GKCXm6BERnplfwEUlNOg=";
})
];
});
in
buildGoModule rec {
pname = "vinegar";
version = "1.7.8";
version = "1.8.1";
src = fetchFromGitHub {
owner = "vinegarhq";
repo = "vinegar";
rev = "v${version}";
hash = "sha256-qyBYPBXQgjnGA2LnghPFOd0AO6+sQcZPzPI0rlJvGHE=";
tag = "v${version}";
hash = "sha256-7rc6LKZx0OOZDedtTpHIQT4grx1FejRiVnJnVDUddy4=";
};
vendorHash = "sha256-SDJIoZf/Doa/NrEBRL1WXvz+fyTDGRyG0bvQ0S8A+KA=";
vendorHash = "sha256-TZhdwHom4DTgLs4z/eADeoKakMtyFrvVljDg4JJp7dc=";
nativeBuildInputs = [
pkg-config
glib
makeBinaryWrapper
pkg-config
];
buildInputs = [
cairo
gdk-pixbuf
glib.out
graphene
gtk4
libadwaita
libGL
libxkbcommon
pango.out
vulkan-headers
vulkan-loader
wayland
wine
winetricks
xorg.libX11
xorg.libXcursor
xorg.libXfixes
wayland
vulkan-headers
wine
libGL
libxkbcommon
];
ldflags = [
"-s"
"-w"
];
postPatch = ''
substituteInPlace Makefile --replace-fail 'gtk-update-icon-cache' '${lib.getExe' gtk4 "gtk4-update-icon-cache"}'
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
];
buildPhase = ''
runHook preBuild
make PREFIX=$out
runHook postBuild
'';
# Add getGoDirs to checkPhase since it is not being provided by the buildPhase
preCheck = ''
getGoDirs() {
local type;
type="$1"
if [ -n "$subPackages" ]; then
echo "$subPackages" | sed "s,\(^\| \),\1./,g"
else
find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique | grep -v "$exclude"
fi
}
'';
installPhase = ''
runHook preInstall
make PREFIX=$out install
runHook postInstall
'';
postInstall = ''
wrapProgram $out/bin/vinegar \
--prefix PATH : ${lib.makeBinPath [ wine ]}
--prefix PATH : ${
lib.makeBinPath [
wine
winetricks
]
} \
--prefix PUREGOTK_LIB_FOLDER : ${passthru.libraryPath}/lib
'';
passthru.updateScript = nix-update-script { };
passthru = {
libraryPath = symlinkJoin {
name = "vinegar-puregotk-lib-folder";
paths = [
cairo
gdk-pixbuf
glib.out
graphene
gtk4
libadwaita
pango.out
vulkan-loader
];
};
updateScript = nix-update-script { };
};
meta = {
description = "Open-source, minimal, configurable, fast bootstrapper for running Roblox on Linux";
homepage = "https://github.com/vinegarhq/vinegar";
changelog = "https://github.com/vinegarhq/vinegar/releases/tag/v${version}";
description = "Open-source, minimal, configurable, fast bootstrapper for running Roblox Studio on Linux";
homepage = "https://github.com/vinegarhq/vinegar";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ HeitorAugustoLN ];
mainProgram = "vinegar";
maintainers = with lib.maintainers; [ HeitorAugustoLN ];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.fromSource ];
};
}