mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-25 01:13:39 +10:00
feat: Add nix and rust-toolchain.toml
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
{
|
||||
description = "Drop-OSS app development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
rust-overlay,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
libraries = with pkgs; [
|
||||
glib
|
||||
glibc
|
||||
openssl
|
||||
];
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
git
|
||||
rust-bin.nightly.latest.default
|
||||
rust-analyzer
|
||||
];
|
||||
|
||||
|
||||
buildInputs = libraries;
|
||||
|
||||
shellHook = ''
|
||||
echo "Drop-OSS app development environment loaded."
|
||||
export LD_LIBRARY_PATH="${
|
||||
pkgs.lib.makeLibraryPath libraries
|
||||
}:$LD_LIBRARY_PATH"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user