Skip to content

Commit

Permalink
unit-test: pass in sops-install-secrets via callPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 24, 2024
1 parent 7901c70 commit 32faf53
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
}
);
Expand Down
18 changes: 9 additions & 9 deletions pkgs/unit-tests.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 32faf53

Please sign in to comment.