Merge pull request #17 from nothingmuch/shell

Add unix shell script environment
This commit is contained in:
Luc Perkins 2023-06-04 23:31:03 +02:00 committed by GitHub
commit c678939f61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 0 deletions

View file

@ -54,6 +54,7 @@ Once your preferred template has been initialized, you can use the provided shel
| [Ruby] | [`ruby`](./ruby/) |
| [Rust] | [`rust`](./rust/) |
| [Scala] | [`scala`](./scala/) |
| [Shell] | [`shell`](./shell/) |
| [Zig] | [`zig`](./zig/) |
## Template contents
@ -227,6 +228,10 @@ The sections below list what each template includes. In all cases, you're free t
- [Scala] 3.1.0 ([Java] 17.0.3)
- [sbt] 1.7.1
### [`shell`](./shell/)
- [shellcheck]
### [`zig`](./zig/)
- [Zig] 0.9.1
@ -321,6 +326,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[rust]: https://rust-lang.org
[rust-analyzer]: https://rust-analyzer.github.io
[scala]: https://scala-lang.org
[shellcheck]: https://www.shellcheck.net/
[statix]: https://github.com/nerdypepper/statix
[sbt]: https://www.scala-sbt.org
[spago]: https://github.com/purescript/spago

View file

@ -135,6 +135,11 @@
description = "Scala development environment";
};
shell = {
path = ./shell;
description = "Shell script development environment";
};
zig = {
path = ./zig;
description = "Zig development environment";

1
shell/.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

61
shell/flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1685014919,
"narHash": "sha256-2hsL8OrGYmu68UHWVZbyN/ZyuJuESbvJF6ZqHVHUdXE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ea60cf854a9216d3276134ff2df67952766b4198",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

26
shell/flake.nix Normal file
View file

@ -0,0 +1,26 @@
{
description = "A Nix-flake-based LaTeX development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, flake-utils
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
shellcheck
];
};
});
}