about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/sql/monetdb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/sql/monetdb/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/sql/monetdb/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/sql/monetdb/default.nix b/nixpkgs/pkgs/servers/sql/monetdb/default.nix
new file mode 100644
index 000000000000..3c8f4376274d
--- /dev/null
+++ b/nixpkgs/pkgs/servers/sql/monetdb/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, cmake, python3, bison, openssl, readline, bzip2 }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "monetdb";
+  version = "11.49.5";
+
+  src = fetchurl {
+    url = "https://dev.monetdb.org/downloads/sources/archive/MonetDB-${finalAttrs.version}.tar.bz2";
+    hash = "sha256-GZVPmsgknyOtDIRD56/pbwFX3mLFbxNbaO0pz2PwDNs=";
+  };
+
+  nativeBuildInputs = [ bison cmake python3 ];
+  buildInputs = [ openssl readline bzip2 ];
+
+  postPatch = ''
+    substituteInPlace cmake/monetdb-packages.cmake --replace \
+      'get_os_release_info(LINUX_DISTRO LINUX_DISTRO_VERSION)' \
+      'set(LINUX_DISTRO "nixos")'
+  '';
+
+  postInstall = ''
+    rm $out/bin/monetdb_mtest.sh \
+      $out/bin/mktest.py \
+      $out/bin/sqlsample.php \
+      $out/bin/sqllogictest.py \
+      $out/bin/Mz.py \
+      $out/bin/Mtest.py \
+      $out/bin/sqlsample.pl \
+      $out/bin/malsample.pl \
+      $out/bin/Mconvert.py
+  '';
+
+  meta = with lib; {
+    description = "An open source database system";
+    homepage = "https://www.monetdb.org/";
+    license = licenses.mpl20;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.StillerHarpo ];
+  };
+})