1
1
Fork 0
mirror of https://github.com/the-nix-way/dev-templates synced 2024-05-13 11:36:19 +02:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Joel Benway 3a44facec6
Merge 173d09515b into 4ced0d9048 2024-04-15 20:07:09 +01:00
Luc Perkins 4ced0d9048
Merge pull request #42 from sstubbs/feature/add-jdtls
feature: add jdtls
2024-04-15 15:51:19 -03:00
Stephen Stubbs 9790fbe6da chore: add jdtls to readme 2024-04-15 19:37:27 +01:00
Stephen Stubbs c24a6dc989 feature: add jdtls 2024-04-14 12:58:49 +01:00
Joel Benway 173d09515b
Provide C and C++ links in README 2024-03-23 22:02:03 -05:00
Joel Benway 5033b5dc12
Add C/C++ development flake with some sane defaults. 2024-03-22 16:02:20 -05:00
6 changed files with 101 additions and 1 deletions

View File

@ -29,6 +29,7 @@ Once your preferred template has been initialized, you can use the provided shel
| Language/framework/tool | Template |
| :----------------------- | :---------------------------- |
| [C]/[C++] | [`c-cpp`](./c-cpp/) |
| [Clojure] | [`clojure`](./clojure/) |
| [C#][csharp] | [`csharp`](./csharp/) |
| [Cue] | [`cue`](./cue/) |
@ -64,6 +65,20 @@ Once your preferred template has been initialized, you can use the provided shel
The sections below list what each template includes. In all cases, you're free to add and remove packages as you see fit; the templates are just boilerplate.
### [`c-cpp`](./c-cpp/)
- [clang-tools] 17.0.6
- [cmake] 3.28.3
- [codespell] 2.2.6
- [conan] 2.0.17
- [cppcheck] 2.13.4
- [doxygen] 1.10.0
- [gdb] 14.1
- [gtest] 1.12.1
- [lcov] 1.0
- [vcpkg]
- [vcpkg-tool]
### [`clojure`](./clojure/)
- [Clojure] 1.11.1.1347
@ -145,6 +160,7 @@ A dev template that's fully customizable.
- [Java] 20.0.1+9
- [Maven] 3.9.2
- [Gradle] 9.0.1
- [jdtls] 1.31.0
### [`kotlin`](./kotlin/)
@ -268,15 +284,22 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[boot]: https://www.boot-clj.com
[buf]: https://github.com/bufbuild/buf
[C]: https://www.open-std.org/jtc1/sc22/wg14
[C++]: https://isocpp.org
[cabal]: https://www.haskell.org/cabal
[cachix]: https://www.cachix.org
[cargo]: https://doc.rust-lang.org/cargo
[cargo-audit]: https://crates.io/crates/cargo-audit
[cargo-deny]: https://crates.io/crates/cargo-deny
[clang-tools]: https://clang.llvm.org/
[clippy]: https://github.com/rust-lang/rust-clippy
[clojure]: https://clojure.org
[cmake]: https://cmake.org/
[codespell]: https://github.com/codespell-project/codespell
[composer]: https://getcomposer.org/
[conan]: https://conan.io/
[conftest]: https://www.conftest.dev
[cppcheck]: http://cppcheck.sourceforge.net/
[csharp]: https://dotnet.microsoft.com/en-us/languages/csharp
[cue]: https://cuelang.org
[damon]: https://github.com/hashicorp/damon
@ -292,11 +315,13 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[dhall-toml]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-toml
[dhall-yaml]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-yaml
[dotnet]: https://dotnet.microsoft.com/en-us/
[doxygen]: https://www.doxygen.nl/
[dune]: https://dune.build
[elixir]: https://elixir-lang.org
[elm]: https://elm-lang.org
[elm2nix]: https://github.com/cachix/elm2nix
[flake-utils]: https://github.com/numtide/flake-utils
[gdb]: https://www.gnu.org/software/gdb/
[gigalixir]: https://www.gigalixir.com
[gleam]: https://gleam.run
[go]: https://go.dev
@ -304,14 +329,17 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports
[golangci-lint]: https://github.com/golangci/golangci-lint
[gradle]: https://gradle.org
[gtest]: https://github.com/google/googletest
[hashicorp]: https://hashicorp.com
[haskell]: https://haskell.org
[haxe]: https://haxe.org/
[iex]: https://hexdocs.pm/iex/IEx.html
[java]: https://java.com
[jdtls]: https://projects.eclipse.org/projects/eclipse.jdt.ls
[jq]: https://jqlang.github.io/jq
[kotlin]: https://kotlinlang.org
[latex]: https://www.latex-project.org/
[lcov]: https://ltp.sourceforge.net/coverage/lcov.php
[leiningen]: https://leiningen.org
[levant]: https://github.com/hashicorp/levant
[lorri]: https://github.com/target/lorri
@ -365,6 +393,8 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[texlive]: https://www.tug.org/texlive/
[tflint]: https://github.com/terraform-linters/tflint
[vault]: https://www.vaultproject.io
[vcpkg]: https://vcpkg.io/
[vcpkg-tool]: https://github.com/microsoft/vcpkg-tool
[virtualenv]: https://pypi.org/project/virtualenv
[vulnix]: https://github.com/flyingcircusio/vulnix
[yarn]: https://yarnpkg.com

1
c-cpp/.envrc Normal file
View File

@ -0,0 +1 @@
use flake

25
c-cpp/flake.lock Normal file
View File

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1711001935,
"narHash": "sha256-URtGpHue7HHZK0mrHnSf8wJ6OmMKYSsoLmJybrOLFSQ=",
"rev": "20f77aa09916374aa3141cbc605c955626762c9a",
"revCount": 600876,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.600876%2Brev-20f77aa09916374aa3141cbc605c955626762c9a/018e65e3-9c1d-74a8-acde-67868b074670/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

37
c-cpp/flake.nix Normal file
View File

@ -0,0 +1,37 @@
{
description = "A Nix-flake-based C/C++ development environment";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell.override {
# Override stdenv in order to change compiler:
# stdenv = pkgs.clangStdenv;
}
{
packages = with pkgs; [
clang-tools
cmake
codespell
conan
cppcheck
doxygen
gdb
gtest
lcov
vcpkg
vcpkg-tool
];
};
});
};
}

View File

@ -81,6 +81,11 @@
{
templates = rec {
c-cpp = {
path = ./c-cpp;
description = "C/C++ development environment";
};
clojure = {
path = ./clojure;
description = "Clojure development environment";
@ -238,6 +243,8 @@
# Aliases
rt = rust-toolchain;
c = c-cpp;
cpp = c-cpp;
};
};
}

View File

@ -21,7 +21,7 @@
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ gradle jdk maven ];
packages = with pkgs; [ gradle jdk maven jdt-language-server ];
};
});
};