diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changelog
 
+## 1.4.1.4
+- Simplify Setup.hs to use defaultMain, fixing builds in Nix and other
+  environments where the custom library search logic failed.
+
 ## 0.1.4.2
 - Move deprecated FFI functions to the Deprecated module.
 
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,109 +1,2 @@
--- Setup.hs
-
-import Control.Exception (bracket)
-import Control.Monad (filterM, forM_)
-import Data.List (nub)
-import Data.Maybe (catMaybes, isJust, listToMaybe)
-import Distribution.PackageDescription (
-  GenericPackageDescription (..),
-  PackageDescription (..),
-  extraLibDirs,
-  libBuildInfo,
-  library,
-  package,
- )
 import Distribution.Simple
-import Distribution.Simple.Compiler (compilerInfo)
-import Distribution.Simple.InstallDirs (absoluteInstallDirs, dynlibdir, libdir)
-import Distribution.Simple.LocalBuildInfo (LocalBuildInfo (..), localUnitId)
-import Distribution.Simple.Setup (configExtraLibDirs, configVerbosity, copyDest, defaultCopyFlags, fromFlag)
-import Distribution.Simple.Utils (copyFileVerbose, createDirectoryIfMissingVerbose, createTempDirectory, info)
-import Distribution.Verbosity (Verbosity)
-import System.Directory (
-  doesDirectoryExist,
-  doesFileExist,
-  findFile,
-  getCurrentDirectory,
-  getTemporaryDirectory,
-  removeDirectoryRecursive,
- )
-import System.Environment (lookupEnv)
-import System.FilePath ((</>), splitSearchPath)
-import System.Process (callProcess)
-
-main :: IO ()
-main =
-  defaultMainWithHooks
-    simpleUserHooks
-      { preConf = \args flags -> do
-          ensureDuckDBAvailable (fromFlag (configVerbosity flags))
-          preConf simpleUserHooks args flags
-      }
-
-systemLibraryCandidates :: [FilePath]
-systemLibraryCandidates =
-  [ "libduckdb.so"
-  , "libduckdb.so.1"
-  , "libduckdb.so.1.4"
-  , "libduckdb.so.1.4.0"
-  , "libduckdb.so.1.4.1"
-  ]
-
-
-ensureDuckDBAvailable :: Verbosity -> IO ()
-ensureDuckDBAvailable verb = do
-  available <- systemDuckDBAvailable
-  if available
-    then info verb "libduckdb found"
-    else error "libduckdb not found, please install libduckdb (available at https://duckdb.org/install/)"
-
-
-systemDuckDBAvailable :: IO Bool
-systemDuckDBAvailable = do
-  header <- findDuckDBHeader
-  lib <- findDuckDBLibrary
-  pure (isJust header && isJust lib)
-
-findDuckDBHeader :: IO (Maybe FilePath)
-findDuckDBHeader = do
-  paths <- headerSearchPaths
-  findFile paths "duckdb.h"
-
-findDuckDBLibrary :: IO (Maybe FilePath)
-findDuckDBLibrary = do
-  paths <- librarySearchPaths
-  listToMaybe . catMaybes <$> mapM (findFile paths) systemLibraryCandidates
-
-headerSearchPaths :: IO [FilePath]
-headerSearchPaths = do
-  envPaths <- gatherEnvPaths ["C_INCLUDE_PATH", "CPATH", "INCLUDE"]
-  let defaults =
-        [ "/usr/include"
-        , "/usr/local/include"
-        , "/usr/include/x86_64-linux-gnu"
-        , "/usr/include/aarch64-linux-gnu"
-        , "/opt/homebrew/include"
-        , "/opt/local/include"
-        ]
-  pure (nub (envPaths ++ defaults))
-
-librarySearchPaths :: IO [FilePath]
-librarySearchPaths = do
-  envPaths <- gatherEnvPaths ["LIBRARY_PATH", "LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH", "LIB"]
-  let defaults =
-        [ "/usr/lib"
-        , "/usr/local/lib"
-        , "/usr/lib64"
-        , "/usr/local/lib64"
-        , "/usr/lib/x86_64-linux-gnu"
-        , "/usr/lib/aarch64-linux-gnu"
-        , "/opt/homebrew/lib"
-        , "/opt/local/lib"
-        ]
-  pure (nub (envPaths ++ defaults))
-
-gatherEnvPaths :: [String] -> IO [FilePath]
-gatherEnvPaths names = do
-  vals <- mapM lookupEnv names
-  let paths = concatMap splitSearchPath (catMaybes vals)
-  pure (filter (not . null) paths)
+main = defaultMain
diff --git a/duckdb-ffi.cabal b/duckdb-ffi.cabal
--- a/duckdb-ffi.cabal
+++ b/duckdb-ffi.cabal
@@ -1,10 +1,10 @@
 cabal-version:      3.4
 name:               duckdb-ffi
-version:            1.4.1.3
+version:            1.4.1.4
 author:             Matthias Pall Gissurarson
 maintainer:         mpg@mpg.is
 category:           Database
-build-type:         Custom
+build-type:         Simple
 license:            MPL-2.0
 license-file:       LICENSE
 synopsis:           Haskell FFI bindings for DuckDB
@@ -12,9 +12,11 @@
 bug-reports:    https://github.com/Tritlo/duckdb-haskell/issues
 description:
     This library provides low-level FFI bindings to DuckDB.
-    Tested with DuckDB version 1.4.0, and 1.4.0.
+    Tested with DuckDB version 1.4.0 and 1.4.1.
     Exposes the full DuckDB C API.
-    Note: requires libduckdb and duckdb.h to be installed on the system.
+    .
+    Requires libduckdb to be installed on the system.
+    See <https://duckdb.org/docs/installation> for installation instructions.
 extra-doc-files:    CHANGELOG.md
 
 source-repository head
@@ -22,13 +24,6 @@
   location: https://github.com/Tritlo/duckdb-haskell.git
   subdir:  duckdb-ffi
 
-
-custom-setup
-  setup-depends: base >=4.18 && <4.21,
-                 Cabal >=3.4 && <3.16,
-                 directory >= 1.3 && <1.4,
-                 filepath >= 1.4 && <1.5,
-                 process >= 1.6 && <1.7,
 
 library
   default-language:
