unit-test: pass in sops-install-secrets via callPackage

This commit is contained in:
Jörg Thalheim 2024-11-24 15:28:29 +01:00
parent 1674c94dc0
commit 563411a342
3 changed files with 13 additions and 13 deletions

View file

@ -16,8 +16,6 @@ rec {
# backwards compatibility
inherit (pkgs) ssh-to-pgp;
unit-tests = pkgs.callPackage ./pkgs/unit-tests.nix { };
}
// (pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
lint = pkgs.callPackage ./pkgs/lint.nix {

View file

@ -156,9 +156,11 @@
);
devShells = eachSystem (
{ pkgs, ... }:
{ system, pkgs, ... }:
{
unit-tests = pkgs.callPackage ./pkgs/unit-tests.nix { };
unit-tests = pkgs.callPackage ./pkgs/unit-tests.nix {
sops-install-secrets = self.packages.${system}.sops-install-secrets;
};
default = pkgs.callPackage ./shell.nix { };
}
);

View file

@ -1,17 +1,17 @@
{
pkgs ? import <nixpkgs> { },
stdenv,
gnupg,
util-linux,
nix,
sops-install-secrets,
}:
let
sopsPkgs = import ../. { inherit pkgs; };
in
pkgs.stdenv.mkDerivation {
name = "unit-tests";
nativeBuildInputs = with pkgs; [
bashInteractive
stdenv.mkDerivation {
name = "unittests";
nativeBuildInputs = [
gnupg
util-linux
nix
sopsPkgs.sops-install-secrets.unittest
sops-install-secrets.unittest
];
# allow to prefetch shell dependencies in build phase
dontUnpack = true;