Merge pull request 'fix uneccessary clan-cli rebuilds by not relying on self' (#197) from Mic92-main into main
This commit is contained in:
@@ -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" { } ''
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user