Files
nixpkgs/pkgs/by-name/wa/wails/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

98 lines
2.0 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
pkg-config,
makeWrapper,
go,
nodejs,
zlib,
nix-update-script,
# Linux specific dependencies
gtk3,
webkitgtk_4_1,
}:
buildGoModule rec {
pname = "wails";
version = "2.10.2";
src =
fetchFromGitHub {
owner = "wailsapp";
repo = "wails";
tag = "v${version}";
hash = "sha256-b0ns2cXlUT5tPbVEOzQGftxoUqGEDuzj+2KDxNnfs4c=";
}
+ "/v2";
vendorHash = "sha256-u1NoAHxBSzw44W3l5MzMxMUjgrfM9EDkKwR4GAPQBVE=";
proxyVendor = true;
subPackages = [ "cmd/wails" ];
# These packages are needed to build wails
# and will also need to be used when building a wails app.
nativeBuildInputs = [
pkg-config
makeWrapper
];
# Wails apps are built with Go, so we need to be able to
# add it in propagatedBuildInputs.
allowGoReference = true;
# Following packages are required when wails used as a builder.
propagatedBuildInputs = [
pkg-config
go
stdenv.cc
nodejs
]
++ lib.optionals stdenv.hostPlatform.isLinux [
gtk3
webkitgtk_4_1
];
ldflags = [
"-s"
"-w"
];
# As Wails calls a compiler, certain apps and libraries need to be made available.
postFixup = ''
wrapProgram $out/bin/wails \
--prefix PATH : ${
lib.makeBinPath [
pkg-config
go
stdenv.cc
nodejs
]
} \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath (
lib.optionals stdenv.hostPlatform.isLinux [
gtk3
webkitgtk_4_1
]
)
}" \
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH" \
--set CGO_LDFLAGS "-L${lib.makeLibraryPath [ zlib ]}"
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Build desktop applications using Go & Web Technologies";
homepage = "https://wails.io";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ thtrf ];
mainProgram = "wails";
platforms = lib.platforms.unix;
};
}