diff options
| -rw-r--r-- | flake.lock | 17 | ||||
| -rw-r--r-- | flake.nix | 24 | ||||
| -rw-r--r-- | shells/perf/shell.nix | 22 | ||||
| -rw-r--r-- | shells/releng/shell.nix | 26 | ||||
| -rw-r--r-- | shells/rust/shell.nix | 37 | ||||
| -rw-r--r-- | shells/sqlite/shell.nix | 21 | ||||
| -rw-r--r-- | shells/zig/shell.nix (renamed from shells/zig.nix) | 0 |
7 files changed, 139 insertions, 8 deletions
@@ -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" } } @@ -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 <benedikt.peetz@b-peetz.de> +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + 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 <benedikt.peetz@b-peetz.de> +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + 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 <benedikt.peetz@b-peetz.de> +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + 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 <benedikt.peetz@b-peetz.de> +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + mkShell, + sqlite-interactive, +}: +mkShell { + __structuredAttrs = true; + + packages = [ + sqlite-interactive + ]; +} diff --git a/shells/zig.nix b/shells/zig/shell.nix index 3d3d874..3d3d874 100644 --- a/shells/zig.nix +++ b/shells/zig/shell.nix |
