From c2db3431a42fb311b74383d1cc0a01c5763946af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marijan=20Petri=C4=8Devi=C4=87?=
 <marijan.petricevic94@gmail.com>
Date: Thu, 26 Jan 2023 13:08:45 -0500
Subject: [PATCH] RSA: init at 2.4.1

---
 horizon.dhall        |  1 +
 initial-packages.nix |  2 ++
 pkgs/RSA.nix         | 51 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 pkgs/RSA.nix

diff --git a/horizon.dhall b/horizon.dhall
index d6f12131..efb5960a 100644
--- a/horizon.dhall
+++ b/horizon.dhall
@@ -822,6 +822,7 @@ let packages =
       , retry = H.callHackage "retry" "0.9.3.0"
       , rope-utf16-splay = H.callHackage "rope-utf16-splay" "0.4.0.0"
       , row-types = H.callHackage "row-types" "1.0.1.2"
+      , RSA = H.callHackage "RSA" "2.4.1"
       , safe-coloured-text-layout =
           H.callHackage "safe-coloured-text-layout" "0.0.0.0"
       , safe-coloured-text-terminfo =
diff --git a/initial-packages.nix b/initial-packages.nix
index 64cedbfc..6e154bde 100644
--- a/initial-packages.nix
+++ b/initial-packages.nix
@@ -53,6 +53,8 @@ self: with pkgs.haskell.lib; {
 
   QuickCheck = self.callPackage (./pkgs/QuickCheck.nix) { };
 
+  RSA = self.callPackage (./pkgs/RSA.nix) { };
+
   SHA = self.callPackage (./pkgs/SHA.nix) { };
 
   StateVar = self.callPackage (./pkgs/StateVar.nix) { };
diff --git a/pkgs/RSA.nix b/pkgs/RSA.nix
new file mode 100644
index 00000000..0a91233e
--- /dev/null
+++ b/pkgs/RSA.nix
@@ -0,0 +1,51 @@
+{ mkDerivation
+, QuickCheck
+, SHA
+, base
+, binary
+, bytestring
+, crypto-api
+, crypto-pubkey-types
+, lib
+, tagged
+, test-framework
+, test-framework-quickcheck2
+}:
+mkDerivation {
+  pname = "RSA";
+  version = "2.4.1";
+  sha256 = "72c5d8c45ef1013e0e8aff763bb8894df0f022f28e698e33ae87bbdb33d69041";
+  isLibrary = true;
+  isExecutable = false;
+  enableSeparateDataOutput = false;
+  libraryHaskellDepends = [
+    base
+    binary
+    bytestring
+    crypto-api
+    crypto-pubkey-types
+    SHA
+  ];
+  testHaskellDepends = [
+    base
+    binary
+    bytestring
+    crypto-api
+    crypto-pubkey-types
+    QuickCheck
+    SHA
+    tagged
+    test-framework
+    test-framework-quickcheck2
+  ];
+  enableLibraryProfiling = true;
+  enableExecutableProfiling = true;
+  doHaddock = false;
+  jailbreak = true;
+  doCheck = false;
+  doBenchmark = false;
+  hyperlinkSource = false;
+  description = "Implementation of RSA, using the padding schemes of PKCS#1 v2.1.";
+  license = lib.licenses.bsd3;
+  broken = false;
+}
-- 
GitLab