mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-12-26 14:14:58 +08:00
unit-test: pass in sops-install-secrets via callPackage
This commit is contained in:
parent
1674c94dc0
commit
563411a342
3 changed files with 13 additions and 13 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 { };
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue