From 4ade4e91e6bba439b96066c1e7f261589a2de6ee Mon Sep 17 00:00:00 2001 From: Rexiel Scarlet <37258415+Rexcrazy804@users.noreply.github.com> Date: Mon, 10 Nov 2025 22:15:29 +0400 Subject: [PATCH] fix(nix): fix shell.nix for non flake `nix-shell` invocation - relocated shell.nix to nix/shell.nix - initialized shell.nix at root to correctly invoke the shell with `nix-shell` command for non flake --- flake.nix | 2 +- nix/shell.nix | 31 +++++++++++++++++++++++++++++++ shell.nix | 32 +------------------------------- 3 files changed, 33 insertions(+), 32 deletions(-) create mode 100644 nix/shell.nix diff --git a/flake.nix b/flake.nix index 5fba4116..97751c15 100644 --- a/flake.nix +++ b/flake.nix @@ -42,7 +42,7 @@ system: let pkgs = nixpkgs.legacyPackages.${system}; in { - default = pkgs.callPackage ./shell.nix {}; + default = pkgs.callPackage ./nix/shell.nix {}; } ); diff --git a/nix/shell.nix b/nix/shell.nix new file mode 100644 index 00000000..b6dcf225 --- /dev/null +++ b/nix/shell.nix @@ -0,0 +1,31 @@ +{ + alejandra, + statix, + deadnix, + shfmt, + shellcheck, + jsonfmt, + lefthook, + kdePackages, + mkShellNoCC, +}: +mkShellNoCC { + #it's faster than mkDerivation / mkShell + packages = [ + # nix + alejandra # formatter + statix # linter + deadnix # linter + + # shell + shfmt # formatter + shellcheck # linter + + # json + jsonfmt # formatter + + # CoC + lefthook # githooks + kdePackages.qtdeclarative # qmlfmt, qmllint, qmlls and etc; Qt6 + ]; +} diff --git a/shell.nix b/shell.nix index b6dcf225..8f5bdf1f 100644 --- a/shell.nix +++ b/shell.nix @@ -1,31 +1 @@ -{ - alejandra, - statix, - deadnix, - shfmt, - shellcheck, - jsonfmt, - lefthook, - kdePackages, - mkShellNoCC, -}: -mkShellNoCC { - #it's faster than mkDerivation / mkShell - packages = [ - # nix - alejandra # formatter - statix # linter - deadnix # linter - - # shell - shfmt # formatter - shellcheck # linter - - # json - jsonfmt # formatter - - # CoC - lefthook # githooks - kdePackages.qtdeclarative # qmlfmt, qmllint, qmlls and etc; Qt6 - ]; -} +(import {}).callPackage ./nix/shell.nix {}