forked from tauri-apps/tao
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add direnv config for work on nix systems.
Add flake.nix and .envrc inputs for use on nix as declarative nix is best nix. Autogenerate flake.lock based on flake.nix. Add .direnv/ to .gitignore.
- Loading branch information
1 parent
f87526e
commit dc71a8d
Showing
4 changed files
with
152 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use_flake . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ rls/ | |
*.ts | ||
*.js | ||
#*# | ||
.DS_Store | ||
.DS_Store | ||
.direnv/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
description = "Direnv environment for rust"; | ||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
inputs.fenix = { | ||
url = "github:nix-community/fenix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
outputs = { nixpkgs, flake-utils, fenix, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ fenix.overlays.default ]; | ||
}; | ||
in | ||
{ | ||
devShells.default = pkgs.mkShell { | ||
packages = [ | ||
(pkgs.fenix.stable.withComponents [ | ||
"cargo" | ||
"clippy" | ||
"rust-src" | ||
"rustc" | ||
"rustfmt" | ||
"rust-analyzer" | ||
]) | ||
pkgs.bacon | ||
pkgs.pkg-config | ||
pkgs.openssl | ||
]; | ||
shellHook = '' | ||
export PKG_CONFIG_PATH=${ | ||
pkgs.lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ | ||
pkgs.glib | ||
pkgs.gtk3 | ||
pkgs.pango | ||
pkgs.gdk-pixbuf | ||
pkgs.cairo | ||
pkgs.at-spi2-atk | ||
pkgs.harfbuzz | ||
pkgs.zlib | ||
pkgs.gtk-layer-shell | ||
] | ||
} | ||
''; | ||
}; | ||
}); | ||
} |