mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-27 23:33:30 +00:00
wails: fix build on darwin
This commit is contained in:
parent
14f05546fe
commit
9e7e5156e4
@ -5,11 +5,11 @@
|
|||||||
, pkg-config
|
, pkg-config
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, go
|
, go
|
||||||
, gcc
|
|
||||||
, gtk3
|
|
||||||
, webkitgtk
|
|
||||||
, nodejs
|
, nodejs
|
||||||
, zlib
|
, zlib
|
||||||
|
# Linux specific dependencies
|
||||||
|
, gtk3
|
||||||
|
, webkitgtk
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
@ -44,10 +44,11 @@ buildGoModule rec {
|
|||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
go
|
go
|
||||||
gcc
|
stdenv.cc
|
||||||
|
nodejs
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
gtk3
|
gtk3
|
||||||
webkitgtk
|
webkitgtk
|
||||||
nodejs
|
|
||||||
];
|
];
|
||||||
|
|
||||||
ldflags = [
|
ldflags = [
|
||||||
@ -58,18 +59,18 @@ buildGoModule rec {
|
|||||||
# As Wails calls a compiler, certain apps and libraries need to be made available.
|
# As Wails calls a compiler, certain apps and libraries need to be made available.
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapProgram $out/bin/wails \
|
wrapProgram $out/bin/wails \
|
||||||
--prefix PATH : ${lib.makeBinPath [ pkg-config go gcc nodejs ]} \
|
--prefix PATH : ${lib.makeBinPath [ pkg-config go stdenv.cc nodejs ]} \
|
||||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk3 webkitgtk ]} \
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optionals stdenv.isLinux [ gtk3 webkitgtk ])}" \
|
||||||
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH" \
|
--set PKG_CONFIG_PATH "$PKG_CONFIG_PATH" \
|
||||||
--set CGO_LDFLAGS "-L${lib.makeLibraryPath [ zlib ]}"
|
--set CGO_LDFLAGS "-L${lib.makeLibraryPath [ zlib ]}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Build applications using Go + HTML + CSS + JS";
|
description = "Build applications using Go + HTML + CSS + JS";
|
||||||
mainProgram = "wails";
|
|
||||||
homepage = "https://wails.io";
|
homepage = "https://wails.io";
|
||||||
license = licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with maintainers; [ ianmjones ];
|
maintainers = with lib.maintainers; [ ianmjones ];
|
||||||
platforms = platforms.linux;
|
mainProgram = "wails";
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -20053,7 +20053,9 @@ with pkgs;
|
|||||||
|
|
||||||
vtable-dumper = callPackage ../development/tools/misc/vtable-dumper { };
|
vtable-dumper = callPackage ../development/tools/misc/vtable-dumper { };
|
||||||
|
|
||||||
wails = callPackage ../development/tools/wails { };
|
wails = callPackage ../development/tools/wails {
|
||||||
|
stdenv = gccStdenv;
|
||||||
|
};
|
||||||
|
|
||||||
wasmer-pack = callPackage ../development/tools/misc/wasmer-pack { };
|
wasmer-pack = callPackage ../development/tools/misc/wasmer-pack { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user