mirror of
https://github.com/JaxTheWolf/nix-shells.git
synced 2026-03-31 21:20:23 +02:00
Add justfile
Update lock Add treefmt
This commit is contained in:
21
Justfile
Normal file
21
Justfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
update:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "Starting update scan..."
|
||||||
|
for dir in */; do
|
||||||
|
dirname=${dir%/}
|
||||||
|
if [ -f "$dir/flake.nix" ]; then
|
||||||
|
echo "-------------------------------------------"
|
||||||
|
echo "Updating flake in: $dirname"
|
||||||
|
(cd "$dir" && nix flake update)
|
||||||
|
else
|
||||||
|
echo "Skipping $dirname (no flake.nix found)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "-------------------------------------------"
|
||||||
|
echo "Update complete."
|
||||||
|
|
||||||
|
update-lang lang:
|
||||||
|
cd {{lang}} && nix flake update
|
||||||
|
|
||||||
|
format:
|
||||||
|
treefmt .
|
||||||
6
cpp/flake.lock
generated
6
cpp/flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771932323,
|
"lastModified": 1774612448,
|
||||||
"narHash": "sha256-3PadsTzuMJT/x0KmiD/Me1GG6rW8kaHoWVduSs0ue7o=",
|
"narHash": "sha256-+uVDNwxihd82I6aZTgNvIXqFyLcfUBkg/Y0A8UBgycg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "89bb5c5da7a857869cc88ef9b856bffdff8af264",
|
"rev": "b55b0e0c856ac73c7f507336780f97aa7a9746e2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -2,30 +2,30 @@
|
|||||||
description = "Central C++ Dev Shell";
|
description = "Central C++ Dev Shell";
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||||
|
|
||||||
outputs =
|
outputs = {
|
||||||
{ self, nixpkgs }:
|
self,
|
||||||
let
|
nixpkgs,
|
||||||
system = "x86_64-linux";
|
}: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
system = "x86_64-linux";
|
||||||
in
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
{
|
in {
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
gcc
|
gcc
|
||||||
cmake
|
cmake
|
||||||
ninja
|
ninja
|
||||||
gdb
|
gdb
|
||||||
pkg-config
|
pkg-config
|
||||||
valgrind
|
valgrind
|
||||||
bind
|
bind
|
||||||
perf
|
perf
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
];
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
3
treefmt.toml
Normal file
3
treefmt.toml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[formatter.alejandra]
|
||||||
|
command = "alejandra"
|
||||||
|
includes = ["*.nix"]
|
||||||
Reference in New Issue
Block a user