gitbutler/flake.nix

71 lines
1.9 KiB
Nix
Raw Normal View History

2024-04-23 13:14:11 +03:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
2024-04-23 13:35:16 +03:00
rust-overlay = {
2024-04-23 13:14:11 +03:00
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
2024-04-23 13:35:16 +03:00
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
2024-04-23 13:14:11 +03:00
flake-utils.lib.eachDefaultSystem
(system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
2024-04-23 14:04:00 +03:00
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
common = with pkgs; [
2024-04-23 13:35:16 +03:00
gtk3
glib
2024-04-23 18:40:03 +03:00
glib-networking
2024-04-23 13:35:16 +03:00
dbus
openssl_3
librsvg
gettext
libiconv
2024-04-23 14:04:00 +03:00
libsoup_3
webkitgtk
nodejs_20
nodePackages.pnpm
2024-04-23 13:35:16 +03:00
];
2024-04-23 14:04:00 +03:00
# runtime Deps
libraries = with pkgs;[
cairo
pango
harfbuzz
gdk-pixbuf
] ++ common;
# compile-time deps
packages = with pkgs; [
2024-04-23 13:35:16 +03:00
curl
wget
pkg-config
2024-04-23 14:04:00 +03:00
rustToolchain
] ++ common;
2024-04-23 13:14:11 +03:00
in
with pkgs;
{
devShells.default = mkShell {
2024-04-23 14:04:00 +03:00
nativeBuildInputs = packages;
buildInputs = libraries;
2024-04-23 13:35:16 +03:00
shellHook =
''
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS
2024-04-23 18:40:03 +03:00
export GIO_MODULE_DIR="${pkgs.glib-networking}/lib/gio/modules/"
2024-04-23 13:35:16 +03:00
'';
2024-04-23 13:14:11 +03:00
};
}
);
}