fix: move vendoring of nixpkgs and select into root devshell

This commit is contained in:
Brian McGee
2025-05-15 10:26:34 +01:00
parent faf8689ab1
commit 6df4705efc
3 changed files with 6 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
{ ... }:
{ inputs, ... }:
{
perSystem =
{
@@ -39,6 +39,10 @@
shellHook = ''
echo -e "${ansiEscapes.green}switch to another dev-shell using: select-shell${ansiEscapes.reset}"
export PRJ_ROOT=$(git rev-parse --show-toplevel)
# vendoring / needed for impure tests
ln -sfT ${self'.packages.clan-cli.nixpkgs} "$PRJ_ROOT/pkgs/clan-cli/clan_cli/nixpkgs"
ln -sfT ${inputs.nix-select} "$PRJ_ROOT/pkgs/clan-cli/clan_cli/select"
'';
};
};

View File

@@ -35,9 +35,8 @@
in
{
devShells.clan-cli = pkgs.callPackage ./shell.nix {
inherit (self'.packages) clan-cli;
inherit self';
inherit (inputs) nix-select;
inherit (self'.packages) clan-cli;
};
packages = {
clan-cli = pkgs.callPackage ./default.nix {

View File

@@ -1,7 +1,6 @@
{
lib,
nix-unit,
nix-select,
clan-cli,
mkShell,
ruff,
@@ -42,10 +41,6 @@ mkShell {
# Add clan command to PATH
export PATH="$PKG_ROOT/bin":"$PATH"
# Needed for impure tests
ln -sfT ${clan-cli.nixpkgs} "$PKG_ROOT/clan_cli/nixpkgs"
ln -sfT ${nix-select} "$PKG_ROOT/clan_cli/select"
# Generate classes.py from inventory schema
# This file is in .gitignore
${self'.packages.classgen}/bin/classgen ${self'.legacyPackages.schemas.inventory-schema-abstract}/schema.json $PKG_ROOT/clan_lib/nix_models/inventory.py