gitbutler/flake.nix

68 lines
1.9 KiB
Nix
Raw Normal View History

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