From 2730189c99656e5ae6bd5795a33e8a3225847036 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 12 Aug 2026 23:27:17 +0200 Subject: feat: Add more shells --- flake.lock | 17 +++++++++++++++++ flake.nix | 24 ++++++++++++++++-------- shells/perf/shell.nix | 22 ++++++++++++++++++++++ shells/releng/shell.nix | 26 ++++++++++++++++++++++++++ shells/rust/shell.nix | 37 +++++++++++++++++++++++++++++++++++++ shells/sqlite/shell.nix | 21 +++++++++++++++++++++ shells/zig.nix | 39 --------------------------------------- shells/zig/shell.nix | 39 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 178 insertions(+), 47 deletions(-) create mode 100644 shells/perf/shell.nix create mode 100644 shells/releng/shell.nix create mode 100644 shells/rust/shell.nix create mode 100644 shells/sqlite/shell.nix delete mode 100644 shells/zig.nix create mode 100644 shells/zig/shell.nix diff --git a/flake.lock b/flake.lock index e8fbf05..bb45e13 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "library": { + "locked": { + "lastModified": 1738443114, + "narHash": "sha256-IV7n/l3rFoz5UuavrDv0a7IIOPne0jDQVmJAR8bve8U=", + "ref": "prime", + "rev": "65bf71bb6ef05ce684924a1dc248bb2e8e2869fb", + "revCount": 17, + "type": "git", + "url": "https://git.foss-syndicate.org/vhack.eu/nix-library" + }, + "original": { + "ref": "prime", + "type": "git", + "url": "https://git.foss-syndicate.org/vhack.eu/nix-library" + } + }, "nixpkgs": { "locked": { "lastModified": 1786410043, @@ -18,6 +34,7 @@ }, "root": { "inputs": { + "library": "library", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 79c663f..79dbb2d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,25 @@ { inputs = { - nixpkgs = { - url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - }; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + library.url = "git+https://git.foss-syndicate.org/vhack.eu/nix-library?ref=prime"; }; - outputs = {nixpkgs, ...}: let + + outputs = { + nixpkgs, + library, + ... + }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages."${system}"; + inherit (library) nixLib; - zig = pkgs.callPackage ./shells/zig.nix {}; - in { - devShells."${system}" = { - inherit zig; + shells = nixLib.mkByName { + useShards = false; + baseDirectory = ./shells; + fileName = "shell.nix"; + finalizeFunction = name: value: pkgs.callPackage value {}; }; + in { + devShells."${system}" = shells; }; } diff --git a/shells/perf/shell.nix b/shells/perf/shell.nix new file mode 100644 index 0000000..4bfaeaf --- /dev/null +++ b/shells/perf/shell.nix @@ -0,0 +1,22 @@ +# rocie - An enterprise grocery management system +# +# Copyright (C) 2024 Benedikt Peetz +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of Rocie. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + mkShell, + hyperfine, +}: +mkShell { + __structuredAttrs = true; + + packages = [ + # Perf + hyperfine + ]; +} diff --git a/shells/releng/shell.nix b/shells/releng/shell.nix new file mode 100644 index 0000000..bdc6e09 --- /dev/null +++ b/shells/releng/shell.nix @@ -0,0 +1,26 @@ +# rocie - An enterprise grocery management system +# +# Copyright (C) 2024 Benedikt Peetz +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of Rocie. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + mkShell, + reuse, + git-bug, + cocogitto, +}: +mkShell { + __structuredAttrs = true; + + packages = [ + # Releng + git-bug + reuse + cocogitto + ]; +} diff --git a/shells/rust/shell.nix b/shells/rust/shell.nix new file mode 100644 index 0000000..e2f748d --- /dev/null +++ b/shells/rust/shell.nix @@ -0,0 +1,37 @@ +# rocie - An enterprise grocery management system +# +# Copyright (C) 2024 Benedikt Peetz +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of Rocie. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + mkShell, + cargo, + clippy, + rustc, + rustfmt, + mold, + cargo-edit, + cargo-expand, + cargo-flamegraph, +}: +mkShell { + __structuredAttrs = true; + + packages = [ + # rust stuff + cargo + clippy + rustc + rustfmt + mold + + cargo-edit + cargo-expand + cargo-flamegraph + ]; +} diff --git a/shells/sqlite/shell.nix b/shells/sqlite/shell.nix new file mode 100644 index 0000000..6b168da --- /dev/null +++ b/shells/sqlite/shell.nix @@ -0,0 +1,21 @@ +# rocie - An enterprise grocery management system +# +# Copyright (C) 2024 Benedikt Peetz +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of Rocie. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + mkShell, + sqlite-interactive, +}: +mkShell { + __structuredAttrs = true; + + packages = [ + sqlite-interactive + ]; +} diff --git a/shells/zig.nix b/shells/zig.nix deleted file mode 100644 index 3d3d874..0000000 --- a/shells/zig.nix +++ /dev/null @@ -1,39 +0,0 @@ -# rocie - An enterprise grocery management system -# -# Copyright (C) 2024 Benedikt Peetz -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of Rocie. -# -# You should have received a copy of the License along with this program. -# If not, see . -{ - mkShell, - pkg-config, - zig, - reuse, - gcc, -}: -mkShell { - __structuredAttrs = true; - - buildInputs = [ - gcc - ]; - - env = { - VARIBALE = "a"; - }; - - nativeBuildInputs = [ - pkg-config - ]; - - packages = [ - zig - - # Releng - reuse - ]; -} diff --git a/shells/zig/shell.nix b/shells/zig/shell.nix new file mode 100644 index 0000000..3d3d874 --- /dev/null +++ b/shells/zig/shell.nix @@ -0,0 +1,39 @@ +# rocie - An enterprise grocery management system +# +# Copyright (C) 2024 Benedikt Peetz +# Copyright (C) 2025 Benedikt Peetz +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of Rocie. +# +# You should have received a copy of the License along with this program. +# If not, see . +{ + mkShell, + pkg-config, + zig, + reuse, + gcc, +}: +mkShell { + __structuredAttrs = true; + + buildInputs = [ + gcc + ]; + + env = { + VARIBALE = "a"; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + packages = [ + zig + + # Releng + reuse + ]; +} -- cgit v1.3.1