diff options
| author | quapka | 2024-08-05 18:07:34 +0200 |
|---|---|---|
| committer | quapka | 2024-08-05 18:07:34 +0200 |
| commit | c405d82be596b7b673d96843c1fac9238ce82a9f (patch) | |
| tree | 967ac0b2fdec5d10003bf103709d4c1626bd2c37 /nix | |
| parent | 3fcaa7a9f4d8e3ac41ccbf96c5b3dfe8d5e20831 (diff) | |
| download | ECTester-c405d82be596b7b673d96843c1fac9238ce82a9f.tar.gz ECTester-c405d82be596b7b673d96843c1fac9238ce82a9f.tar.zst ECTester-c405d82be596b7b673d96843c1fac9238ce82a9f.zip | |
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/libtomcrypt-pkgconfig-for-static.patch | 2 | ||||
| -rw-r--r-- | nix/libtomcrypt-pkgconfig-makefile.txt | 5 | ||||
| -rw-r--r-- | nix/libtomcrypt-pkgconfig-makefile_include.mk.txt | 2 | ||||
| -rw-r--r-- | nix/libtomcrypt.pc.in | 10 | ||||
| -rw-r--r-- | nix/tomcrypt_pkg_versions.nix | 26 |
5 files changed, 43 insertions, 2 deletions
diff --git a/nix/libtomcrypt-pkgconfig-for-static.patch b/nix/libtomcrypt-pkgconfig-for-static.patch index 5db9dbd..441f278 100644 --- a/nix/libtomcrypt-pkgconfig-for-static.patch +++ b/nix/libtomcrypt-pkgconfig-for-static.patch @@ -1,5 +1,3 @@ -# NOTE: LibTomCrypt does not expose the lib, when built statically (using `makefile and not `makefile.shared`). -# This patch copies the necessary code from `makefile.shared`. diff --git a/makefile b/makefile index cd94b86f..ffb65402 100644 --- a/makefile diff --git a/nix/libtomcrypt-pkgconfig-makefile.txt b/nix/libtomcrypt-pkgconfig-makefile.txt new file mode 100644 index 0000000..9f54c85 --- /dev/null +++ b/nix/libtomcrypt-pkgconfig-makefile.txt @@ -0,0 +1,5 @@ + +pkgconfig-patch: + sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc + install -p -d $(DESTDIR)$(LIBPATH)/pkgconfig + install -p -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/ diff --git a/nix/libtomcrypt-pkgconfig-makefile_include.mk.txt b/nix/libtomcrypt-pkgconfig-makefile_include.mk.txt new file mode 100644 index 0000000..c9b4902 --- /dev/null +++ b/nix/libtomcrypt-pkgconfig-makefile_include.mk.txt @@ -0,0 +1,2 @@ + +VERSION_PC=$(VERSION) diff --git a/nix/libtomcrypt.pc.in b/nix/libtomcrypt.pc.in new file mode 100644 index 0000000..714f060 --- /dev/null +++ b/nix/libtomcrypt.pc.in @@ -0,0 +1,10 @@ +prefix=@to-be-replaced@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: LibTomCrypt +Description: public domain open source cryptographic toolkit +Version: @to-be-replaced@ +Libs: -L${libdir} -ltomcrypt +Cflags: -I${includedir} diff --git a/nix/tomcrypt_pkg_versions.nix b/nix/tomcrypt_pkg_versions.nix new file mode 100644 index 0000000..fcd0883 --- /dev/null +++ b/nix/tomcrypt_pkg_versions.nix @@ -0,0 +1,26 @@ +{ + buildECTesterStandalone +}: +{ + v1182 = buildECTesterStandalone { + tomcrypt = { version = "1.18.2"; hash = "sha256-MEU+u54aXKGSAMPYsh+L9axowzIHiew1uWq8wDsEBmw=";}; + tommath = { version = "1.3.0"; hash = "sha256-KWJy2TQ1mRMI63NgdgDANLVYgHoH6CnnURQuZcz6nQg="; }; + }; + v1181 = buildECTesterStandalone { + tomcrypt = { version = "1.18.1"; hash = "sha256-P00koc4+mAHQ/L5iCuPoiOeI/msZscO5KHZrqmbotRo=";}; + tommath = { version = "1.3.0"; hash = "sha256-KWJy2TQ1mRMI63NgdgDANLVYgHoH6CnnURQuZcz6nQg="; }; + }; + v1180 = buildECTesterStandalone { + tomcrypt = { version = "1.18.0"; hash = "sha256-Y7U+updJI/f3zD6k84DTZDQZh6vhfqR0W8HyizlUZcU=";}; + tommath = { version = "1.3.0"; hash = "sha256-KWJy2TQ1mRMI63NgdgDANLVYgHoH6CnnURQuZcz6nQg="; }; + }; + # v101 = buildECTesterStandalone { + # tomcrypt = { version = "1.01"; hash = "sha256-lVAPxgkAcBivzZmWfqu0sEh8yGo7Ji2hIYwx4/g0GzM=";}; + # tommath = { version = "1.3.0"; hash = "sha256-KWJy2TQ1mRMI63NgdgDANLVYgHoH6CnnURQuZcz6nQg="; }; + # }; + v117 = buildECTesterStandalone { + tomcrypt = { version = "1.17"; hash = "sha256-NWWAs6p27UC64nDL0MwMvzU5aWNe8LZu7DC06d/8isA=";}; + # NOTE: which is the correct version of libtommath for a particular version of libtomcryp? + tommath = { version = "1.3.0"; hash = "sha256-KWJy2TQ1mRMI63NgdgDANLVYgHoH6CnnURQuZcz6nQg="; }; + }; +} |
