-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init: devshell for hands-on onboarding
- Loading branch information
David Arnold
committed
Apr 20, 2021
1 parent
da67777
commit 7c08d64
Showing
3 changed files
with
41 additions
and
0 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,19 @@ | ||
[devshell] | ||
name = "nixpkgs" | ||
packages = [ | ||
"fd", | ||
"nixpkgs-fmt", | ||
] | ||
|
||
[[commands]] | ||
name = "fmt" | ||
help = "Check Nix formatting" | ||
category = "folder tree checks" | ||
command = "nixpkgs-fmt ${@} ." | ||
|
||
[[commands]] | ||
name = "evalnix" | ||
help = "Check Nix parsing" | ||
category = "folder tree checks" | ||
command = "fd --extension nix --exec nix-instantiate --parse --quiet {} >/dev/null" | ||
|
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
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,17 @@ | ||
{ system ? builtins.currentSystem }: | ||
let | ||
# nixpkgs / devshell is only used for development. Don't add it to the flake.lock. | ||
devshellGitRev = "709fe4d04a9101c9d224ad83f73416dce71baf21"; | ||
|
||
nixpkgsSrc = ./.; | ||
|
||
devshellSrc = fetchTarball { | ||
url = "https://github.com/numtide/devshell/archive/${devshellGitRev}.tar.gz"; | ||
sha256 = "1px9cqfshfqs1b7ypyxch3s3ymr4xgycy1krrcg7b97rmmszvsqr"; | ||
}; | ||
|
||
pkgs = import nixpkgsSrc { inherit system; }; | ||
devshell = import devshellSrc { inherit system pkgs; }; | ||
|
||
in | ||
devshell.fromTOML ./devshell.toml |