diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index b1bde572b..3d187644e 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -12,7 +12,6 @@ , pytest-parallel , python3 , runCommand -, self , setuptools , sops , stdenv @@ -50,8 +49,8 @@ let cp -r ${./.} $out chmod -R +w $out rm $out/clan_cli/config/jsonschema - cp -r ${self + /lib/jsonschema} $out/clan_cli/config/jsonschema ln -s ${nixpkgs} $out/clan_cli/nixpkgs + cp -r ${../../lib/jsonschema} $out/clan_cli/config/jsonschema ln -s ${ui-assets} $out/clan_cli/webui/assets ''; nixpkgs = runCommand "nixpkgs" { } '' diff --git a/pkgs/clan-cli/flake-module.nix b/pkgs/clan-cli/flake-module.nix index 921b7778d..d9da6b304 100644 --- a/pkgs/clan-cli/flake-module.nix +++ b/pkgs/clan-cli/flake-module.nix @@ -1,12 +1,10 @@ -{ self, ... }: { +{ perSystem = { self', pkgs, ... }: { devShells.clan-cli = pkgs.callPackage ./shell.nix { - inherit self; - inherit (self'.packages) clan-cli ui-assets; + inherit (self'.packages) clan-cli ui-assets nix-unit; }; packages = { clan-cli = pkgs.python3.pkgs.callPackage ./default.nix { - inherit self; inherit (self'.packages) ui-assets zerotierone; }; clan-openapi = self'.packages.clan-cli.clan-openapi; diff --git a/pkgs/clan-cli/shell.nix b/pkgs/clan-cli/shell.nix index 600f5a34b..942fe9366 100644 --- a/pkgs/clan-cli/shell.nix +++ b/pkgs/clan-cli/shell.nix @@ -1,6 +1,6 @@ -{ self, clan-cli, pkgs, ui-assets }: +{ nix-unit, clan-cli, ui-assets, python3, system, ruff, mkShell, writeScriptBin }: let - pythonWithDeps = pkgs.python3.withPackages ( + pythonWithDeps = python3.withPackages ( ps: clan-cli.propagatedBuildInputs ++ clan-cli.devDependencies @@ -8,14 +8,14 @@ let ps.pip ] ); - checkScript = pkgs.writeScriptBin "check" '' - nix build .#checks.${pkgs.system}.{treefmt,clan-pytest} -L "$@" + checkScript = writeScriptBin "check" '' + nix build .#checks.${system}.{treefmt,clan-pytest} -L "$@" ''; in -pkgs.mkShell { +mkShell { packages = [ - pkgs.ruff - self.packages.${pkgs.system}.nix-unit + ruff + nix-unit pythonWithDeps ]; # sets up an editable install and add enty points to $PATH