diff --git a/manifest.dhall b/manifest.dhall
index 1ab55ad49a8f33aab40902cf0990a5465333f545..086e57c7d892d24d9350d1797f8827772c27bf97 100644
--- a/manifest.dhall
+++ b/manifest.dhall
@@ -352,6 +352,7 @@ in  [ callHackage "Cabal" "3.8.1.0"
     , callHackage "lens" "5.2"
     , callHackage "lens-aeson" "1.2.1"
     , callHackage "lens-family-th" "0.5.2.1"
+    , callHackage "libsodium" "1.0.18.2"
     , callHackage "libyaml" "0.1.2"
     , callHackage "lifted-async" "0.10.2.1"
     , callHackage "lifted-base" "0.2.3.12"
diff --git a/overlay.nix b/overlay.nix
index 46ee22be17e6f4ab93c9a7b9d31d0bac97675d5e..1470930e6adb9c240f84d3dc7df131d5669d20b1 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -441,6 +441,8 @@ final: prev: with pkgs.haskell.lib; {
 
   lens-family-th = prev.callPackage (./pkgs/lens-family-th.nix) { };
 
+  libsodium = prev.callPackage (./pkgs/libsodium.nix) { };
+
   libyaml = prev.callPackage (./pkgs/libyaml.nix) { };
 
   lifted-async = prev.callPackage (./pkgs/lifted-async.nix) { };
diff --git a/pkgs/libsodium.nix b/pkgs/libsodium.nix
new file mode 100644
index 0000000000000000000000000000000000000000..6ea1dc54bbb16c39dd1c7e54e7f3ee98ac381919
--- /dev/null
+++ b/pkgs/libsodium.nix
@@ -0,0 +1,41 @@
+{ mkDerivation
+, base
+, c2hs
+, hedgehog
+, lib
+, libsodium
+, tasty
+, tasty-hedgehog
+, tasty-hunit
+}:
+mkDerivation {
+  pname = "libsodium";
+  version = "1.0.18.2";
+  sha256 = "9cc7620f019993b04019df6a2563831beee2eb93b45431fad728c63be7312108";
+  isLibrary = true;
+  isExecutable = false;
+  enableSeparateDataOutput = false;
+  libraryHaskellDepends = [ base ];
+  libraryPkgconfigDepends = [ libsodium ];
+  libraryToolDepends = [ c2hs ];
+  testHaskellDepends = [
+    base
+    hedgehog
+    tasty
+    tasty-hedgehog
+    tasty-hunit
+  ];
+  testPkgconfigDepends = [ libsodium ];
+  testToolDepends = [ c2hs ];
+  enableLibraryProfiling = false;
+  enableExecutableProfiling = false;
+  doHaddock = false;
+  jailbreak = true;
+  doCheck = false;
+  doBenchmark = false;
+  hyperlinkSource = false;
+  homepage = "https://github.com/k0001/hs-libsodium";
+  description = "Low-level bindings to the libsodium C library";
+  license = lib.licenses.isc;
+  broken = false;
+}