diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-03-10 00:15:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 00:15:31 +0100 |
commit | 809ffc101fc429700ec1f8c3816e1029258c2277 (patch) | |
tree | 5a36882e644515b624b0c7669628108aa3a845e9 /pkgs/development/tools | |
parent | 09477e8a643f3175928062bff14641cec64cfd9a (diff) | |
parent | 6e3286cc63654d3c279424f55ba4118f6fccf6a8 (diff) | |
download | nixpkgs-809ffc101fc429700ec1f8c3816e1029258c2277.tar nixpkgs-809ffc101fc429700ec1f8c3816e1029258c2277.tar.gz nixpkgs-809ffc101fc429700ec1f8c3816e1029258c2277.tar.bz2 nixpkgs-809ffc101fc429700ec1f8c3816e1029258c2277.tar.lz nixpkgs-809ffc101fc429700ec1f8c3816e1029258c2277.tar.xz nixpkgs-809ffc101fc429700ec1f8c3816e1029258c2277.tar.zst nixpkgs-809ffc101fc429700ec1f8c3816e1029258c2277.zip |
Merge pull request #162947 from ianmjones/wails-2.0.0-beta.33
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/wails/default.nix | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/development/tools/wails/default.nix b/pkgs/development/tools/wails/default.nix new file mode 100644 index 00000000000..2d0576592ec --- /dev/null +++ b/pkgs/development/tools/wails/default.nix @@ -0,0 +1,78 @@ +{ lib +, stdenv +, buildGoModule +, fetchFromGitHub +, pkg-config +, makeWrapper +, go +, gcc +, gtk3 +, webkitgtk +, nodejs +, upx +, zlib +}: + +buildGoModule rec { + pname = "wails"; + version = "2.0.0-beta.33"; + + src = fetchFromGitHub { + owner = "wailsapp"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-efxOL/FllToum0P4JyAJt0fbrznTFYh7czTWpZu3uk0="; + } + "/v2"; + + vendorSha256 = "sha256-qPMVsvud2L7hpXUOfYYMiO32JXff8ZZC34EsxFoSJ0g="; + + 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 + gcc + gtk3 + webkitgtk + nodejs + upx + ]; + + 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 gcc nodejs upx ]} \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk3 webkitgtk ]} \ + --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH" \ + --set CGO_LDFLAGS "-L${lib.makeLibraryPath [ zlib ]}" + ''; + + doCheck = true; + + meta = with lib; { + description = "Build applications using Go + HTML + CSS + JS"; + homepage = "https://wails.io"; + license = licenses.mit; + maintainers = with maintainers; [ ianmjones ]; + platforms = platforms.linux; + }; +} |