aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix47
-rw-r--r--nix/botan-2.0.0.patch26
2 files changed, 63 insertions, 10 deletions
diff --git a/flake.nix b/flake.nix
index 371fa92..90af413 100644
--- a/flake.nix
+++ b/flake.nix
@@ -87,16 +87,43 @@
inherit hash;
};
patches =
- { "2.0.0" = ./nix/botan-2.0.0-2.0.1.patch;
- "2.0.1" = ./nix/botan-2.0.0-2.0.1.patch;
- "2.2.0" = [./nix/botan-fe25519-stdexcept.patch ];
- "2.3.0" = [./nix/botan-fe25519-stdexcept.patch ./nix/botan-types-stdexcept.patch];
- "2.4.0" = [./nix/botan-fe25519-stdexcept.patch ./nix/botan-types-stdexcept.patch];
- "2.5.0" = [./nix/botan-fe25519-stdexcept.patch ./nix/botan-types-stdexcept.patch];
- "2.6.0" = [./nix/botan-fe25519-stdexcept.patch ./nix/botan-types-stdexcept.patch];
- "2.7.0" = [./nix/botan-fe25519-stdexcept.patch ./nix/botan-types-stdexcept.patch];
- "2.8.0" = [./nix/botan-fe25519-stdexcept.patch ./nix/botan-types-stdexcept.patch];}."${version}" or (prev.patches or [ ]);
- patchFlags = ["-p1" "-r-"];
+ {
+ "2.0.0" = [
+ ./nix/botan-2.0.0-2.0.1.patch
+ ./nix/botan-2.0.0.patch
+ ];
+ "2.0.1" = ./nix/botan-2.0.0-2.0.1.patch;
+ "2.2.0" = [ ./nix/botan-fe25519-stdexcept.patch ];
+ "2.3.0" = [
+ ./nix/botan-fe25519-stdexcept.patch
+ ./nix/botan-types-stdexcept.patch
+ ];
+ "2.4.0" = [
+ ./nix/botan-fe25519-stdexcept.patch
+ ./nix/botan-types-stdexcept.patch
+ ];
+ "2.5.0" = [
+ ./nix/botan-fe25519-stdexcept.patch
+ ./nix/botan-types-stdexcept.patch
+ ];
+ "2.6.0" = [
+ ./nix/botan-fe25519-stdexcept.patch
+ ./nix/botan-types-stdexcept.patch
+ ];
+ "2.7.0" = [
+ ./nix/botan-fe25519-stdexcept.patch
+ ./nix/botan-types-stdexcept.patch
+ ];
+ "2.8.0" = [
+ ./nix/botan-fe25519-stdexcept.patch
+ ./nix/botan-types-stdexcept.patch
+ ];
+ }
+ ."${version}" or (prev.patches or [ ]);
+ patchFlags = [
+ "-p1"
+ "-r-"
+ ];
}
);
diff --git a/nix/botan-2.0.0.patch b/nix/botan-2.0.0.patch
new file mode 100644
index 0000000..e98612a
--- /dev/null
+++ b/nix/botan-2.0.0.patch
@@ -0,0 +1,26 @@
+diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
+index e65aa3ed3a..de2b5c8b52 100644
+--- a/src/build-data/buildh.in
++++ b/src/build-data/buildh.in
+@@ -27,7 +27,7 @@
+ %{unsafe_fuzzer_mode_define}
+
+ #define BOTAN_INSTALL_PREFIX R"(%{prefix})"
+-#define BOTAN_INSTALL_HEADER_DIR "%{includedir}/botan-%{version_major}.%{version_minor}"
++#define BOTAN_INSTALL_HEADER_DIR "%{includedir}/botan-%{version_major}"
+ #define BOTAN_INSTALL_LIB_DIR "%{libdir}"
+ #define BOTAN_LIB_LINK "%{link_to}"
+
+diff --git a/src/scripts/install.py b/src/scripts/install.py
+index 0045be844d..e03e5c22c3 100755
+--- a/src/scripts/install.py
++++ b/src/scripts/install.py
+@@ -130,7 +130,7 @@ class PercentSignTemplate(string.Template):
+ 'botan-%d.%d.%d' % (ver_major, ver_minor, ver_patch))
+ target_include_dir = os.path.join(options.destdir,
+ options.includedir,
+- 'botan-%d.%d' % (ver_major, ver_minor),
++ 'botan-%d' % (ver_major),
+ 'botan')
+
+ out_dir = process_template('%{out_dir}') \ No newline at end of file