1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, fetchpatch
6, pkg-config
7, curl
8, openssl
9}:
10
11stdenv.mkDerivation rec {
12 pname = "osslsigncode";
13 version = "2.5";
14
15 src = fetchFromGitHub {
16 owner = "mtrojnar";
17 repo = pname;
18 rev = version;
19 sha256 = "sha256-33uT9PFD1YEIMzifZkpbl2EAoC98IsM72K4rRjDfh8g=";
20 };
21
22 patches = [
23 # Cygwin patch is prereq for Darwin fix applying -- committed to master after 2.5 release
24 (fetchpatch {
25 url = "https://github.com/mtrojnar/osslsigncode/commit/1c678bf926b78c947b14c46c3ce88e06268c738e.patch";
26 sha256 = "sha256-vOBMGIJ3PHJTvmsXRRfAUJRi7P929PcfmrUiRuM0pf4=";
27 })
28 # Fix build on Darwin when clang not identified as Apple (https://github.com/mtrojnar/osslsigncode/pull/247)
29 (fetchpatch {
30 url = "https://github.com/charles-dyfis-net/osslsigncode/commit/b2ed89b35c8a26faa7eb6515fecaff3c4c5f7fed.patch";
31 sha256 = "sha256-FGKZK/IzHbbkTzSoAtpC75z79d5+qQvvJrjEDY31WJ0=";
32 })
33 ];
34
35 nativeBuildInputs = [ cmake pkg-config ];
36
37 buildInputs = [ curl openssl ];
38
39 meta = with lib; {
40 homepage = "https://github.com/mtrojnar/osslsigncode";
41 description = "OpenSSL based Authenticode signing for PE/MSI/Java CAB files";
42 license = licenses.gpl3Plus;
43 maintainers = with maintainers; [ mmahut prusnak ];
44 platforms = platforms.all;
45 };
46}