summary refs log tree commit diff
path: root/pkgs/development/libraries/pmdk
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2019-04-07 00:40:12 -0500
committerAustin Seipp <aseipp@pobox.com>2019-04-08 01:42:26 -0500
commit8ace9e6a444ad059732b6ad3dcaad83be964c369 (patch)
tree48bec061fb97c2b1965c37318283e1d9efaa4982 /pkgs/development/libraries/pmdk
parent7fd1250b8010816ef2b7bbbc45fe6304d8421979 (diff)
downloadnixpkgs-8ace9e6a444ad059732b6ad3dcaad83be964c369.tar
nixpkgs-8ace9e6a444ad059732b6ad3dcaad83be964c369.tar.gz
nixpkgs-8ace9e6a444ad059732b6ad3dcaad83be964c369.tar.bz2
nixpkgs-8ace9e6a444ad059732b6ad3dcaad83be964c369.tar.lz
nixpkgs-8ace9e6a444ad059732b6ad3dcaad83be964c369.tar.xz
nixpkgs-8ace9e6a444ad059732b6ad3dcaad83be964c369.tar.zst
nixpkgs-8ace9e6a444ad059732b6ad3dcaad83be964c369.zip
pmdk: init at 1.6
Intel is finally shipping real persistent memory, now that Optane DCPMMs
are available with Cascade Lake processors. Therefore, programmers need
a persistent memory programming API!

In particular, pmdk is needed for QEMU features relating to persistent
memory: by enabling pmdk as a dependency of QEMU, you can proxy NVDIMMs
from the host system to virtual machines with the exact same consistency
guarantees. (In the normal case, these host NVDIMMs can be used as a
backend device for DAX-enabled filesystems, and the persistent memory
given to the virtual machine can be represeted as objects in the
filesystem, allowing granular distribution of non-volatile memory to
clients.)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/development/libraries/pmdk')
-rw-r--r--pkgs/development/libraries/pmdk/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/libraries/pmdk/default.nix b/pkgs/development/libraries/pmdk/default.nix
new file mode 100644
index 00000000000..ceb49fc0153
--- /dev/null
+++ b/pkgs/development/libraries/pmdk/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub
+, autoconf, libndctl, pkgconfig
+}:
+
+stdenv.mkDerivation rec {
+  name = "pmdk-${version}";
+  version = "1.6";
+
+  src = fetchFromGitHub {
+    owner  = "pmem";
+    repo   = "pmdk";
+    rev    = "refs/tags/${version}";
+    sha256 = "11h9h5ifgaa5f6v9y77s5lmsj7k61qg52992s1361cmvl0ndgl9k";
+  };
+
+  nativeBuildInputs = [ autoconf pkgconfig ];
+  buildInputs = [ libndctl ];
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "lib" "dev" "man" ];
+
+  patchPhase = "patchShebangs utils";
+
+  installPhase = ''
+    make install prefix=$out
+
+    mkdir -p $lib $dev $man/share
+    mv $out/share/man $man/share/man
+    mv $out/include $dev/include
+    mv $out/lib     $lib/lib
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Persistent Memory Development Kit";
+    homepage    = https://github.com/pmem/pmdk;
+    license     = licenses.lgpl21;
+    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = [ "x86_64-linux" ]; # aarch64 is experimental
+  };
+}