Created
September 26, 2022 17:01
-
-
Save MatteoJoliveau/54086686f35d6e771d7e475e3b1230a3 to your computer and use it in GitHub Desktop.
Nix shell for Tauri projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
libraries = with pkgs;[ | |
webkitgtk | |
gtk3 | |
cairo | |
gdk-pixbuf | |
glib.out | |
dbus.lib | |
openssl.out | |
]; | |
packages = with pkgs; [ | |
pkg-config | |
dbus | |
openssl | |
glib | |
gtk3 | |
libsoup | |
webkitgtk | |
appimagekit | |
]; | |
in | |
{ | |
devShell = pkgs.mkShell { | |
buildInputs = packages; | |
shellHook = | |
let | |
joinLibs = libs: builtins.concatStringsSep ":" (builtins.map (x: "${x}/lib") libs); | |
libs = joinLibs libraries; | |
in | |
'' | |
export LD_LIBRARY_PATH=${libs}:$LD_LIBRARY_PATH | |
''; | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment