From 62a7c95c8c6284a54ad152e451bc633ac85ddca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 15 Jul 2023 08:19:01 +0200 Subject: [PATCH] vendorHash: make it overridable --- default.nix | 10 +++++----- pkgs/sops-install-secrets/default.nix | 4 ++-- pkgs/sops-pgp-hook-test.nix | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/default.nix b/default.nix index 0e328a3..5136be2 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,8 @@ -{ pkgs ? import {} }: let - vendorSha256 = "sha256-C6YyhJZyspsTQWcogDe5ERAe69KtZEv73wO76oHa8QQ="; - +{ pkgs ? import {} +, vendorHash ? "sha256-C6YyhJZyspsTQWcogDe5ERAe69KtZEv73wO76oHa8QQ=" +}: let sops-install-secrets = pkgs.callPackage ./pkgs/sops-install-secrets { - inherit vendorSha256; + inherit vendorHash; }; in rec { inherit sops-install-secrets; @@ -20,7 +20,7 @@ in rec { # used in the CI only sops-pgp-hook-test = pkgs.callPackage ./pkgs/sops-pgp-hook-test.nix { - inherit vendorSha256; + inherit vendorHash; }; unit-tests = pkgs.callPackage ./pkgs/unit-tests.nix {}; } // (pkgs.lib.optionalAttrs pkgs.stdenv.isLinux { diff --git a/pkgs/sops-install-secrets/default.nix b/pkgs/sops-install-secrets/default.nix index 358f931..590b6e4 100644 --- a/pkgs/sops-install-secrets/default.nix +++ b/pkgs/sops-install-secrets/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildGoModule, path, pkgs, vendorSha256, go }: +{ lib, buildGoModule, path, pkgs, vendorHash, go }: buildGoModule { pname = "sops-install-secrets"; version = "0.0.1"; @@ -29,7 +29,7 @@ buildGoModule { fi ''; - inherit vendorSha256; + inherit vendorHash; meta = with lib; { description = "Atomic secret provisioning based on sops"; diff --git a/pkgs/sops-pgp-hook-test.nix b/pkgs/sops-pgp-hook-test.nix index 75f809d..7f9f7df 100644 --- a/pkgs/sops-pgp-hook-test.nix +++ b/pkgs/sops-pgp-hook-test.nix @@ -1,9 +1,9 @@ -{ buildGoModule, vendorSha256 }: +{ buildGoModule, vendorHash }: buildGoModule { name = "sops-pgp-hook-test"; src = ../.; - inherit vendorSha256; + inherit vendorHash; buildPhase = '' go test -c ./pkgs/sops-pgp-hook install -D sops-pgp-hook.test $out/bin/sops-pgp-hook.test