-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add flag to choose between backends
- Loading branch information
Showing
6 changed files
with
433 additions
and
32 deletions.
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,11 @@ | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" | ||
fi | ||
|
||
nix_direnv_watch_file devenv.nix | ||
nix_direnv_watch_file devenv.lock | ||
nix_direnv_watch_file devenv.yaml | ||
if ! use flake . --impure | ||
then | ||
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2 | ||
fi |
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 |
---|---|---|
|
@@ -16,3 +16,5 @@ test_book/book/ | |
# Ignore Vim temporary and swap files. | ||
*.sw? | ||
*~ | ||
.devenv | ||
.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,43 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; | ||
systems.url = "github:nix-systems/default"; | ||
devenv.url = "github:cachix/devenv"; | ||
fenix.url = "github:nix-community/fenix"; | ||
fenix.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
nixConfig = { | ||
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="; | ||
extra-substituters = "https://devenv.cachix.org"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, devenv, systems, ... } @ inputs: | ||
let | ||
forEachSystem = nixpkgs.lib.genAttrs (import systems); | ||
in | ||
{ | ||
packages = forEachSystem (system: { | ||
devenv-up = self.devShells.${system}.default.config.procfileScript; | ||
}); | ||
|
||
devShells = forEachSystem | ||
(system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in | ||
{ | ||
default = devenv.lib.mkShell { | ||
inherit inputs pkgs; | ||
modules = [ | ||
{ | ||
# https://devenv.sh/reference/options/ | ||
packages = []; | ||
languages.rust.enable = true; | ||
languages.rust.channel = "stable"; | ||
} | ||
]; | ||
}; | ||
}); | ||
}; | ||
} |
Oops, something went wrong.