dragnpkgs/lib/fetchb4/default.nix

24 lines
533 B
Nix

{ lib, stdenvNoCC, b4, git, cacert }:
{
msgid,
hash,
single_message ? false,
version ? null
}: stdenvNoCC.mkDerivation {
name = "patch-${msgid}";
builder = ./builder.sh;
inherit msgid;
b4_flags = with lib.strings; concatStringsSep " " [
(optionalString single_message "--single-message")
(optionalString (version != null) "--use-version ${version}")
];
nativeBuildInputs = [ b4 git cacert ];
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
outputHash = hash;
preferLocalBuild = true;
}