diff --git a/pkgs/tools/filesystems/dislocker/cmake_dirfix.patch b/pkgs/tools/filesystems/dislocker/cmake_dirfix.patch new file mode 100644 index 000000000000..829666bfe7a4 --- /dev/null +++ b/pkgs/tools/filesystems/dislocker/cmake_dirfix.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 365903a..f126ade 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -149,7 +149,7 @@ if(NOT DEFINED bindir) + endif() + + string (TOLOWER "${CMAKE_SYSTEM_NAME}" SYSNAME) +-set (DIS_MAN ../man/${SYSNAME}) ++set (DIS_MAN ${PROJECT_SOURCE_DIR}/man/${SYSNAME}) + + # RPATH handling + if(POLICY CMP0042) diff --git a/pkgs/tools/filesystems/dislocker/default.nix b/pkgs/tools/filesystems/dislocker/default.nix new file mode 100644 index 000000000000..57676e7a89a2 --- /dev/null +++ b/pkgs/tools/filesystems/dislocker/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub +, cmake +, polarssl , fuse +}: +with stdenv.lib; +let + version = "0.6.1"; +in +stdenv.mkDerivation rec { + name = "dislocker-${version}"; + + src = fetchFromGitHub { + owner = "aorimn"; + repo = "dislocker"; + rev = "v${version}"; + sha256 = "1s2pvsf4jgzxk9d9m2ik7v7g81lvj8mhmhh7f53vwy0vmihf9h0d"; + }; + + buildInputs = [ cmake fuse polarssl ]; + + patches = [ ./cmake_dirfix.patch ]; + + meta = { + description = "Read BitLocker encrypted partitions in Linux"; + homepage = https://github.com/aorimn/dislocker; + license = licenses.gpl2; + maintainers = with maintainers; [ elitak ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 18c2f8cc1037..f1aa34d165a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -739,6 +739,8 @@ in asciidoc = asciidoc-full; }; + dislocker = callPackage ../tools/filesystems/dislocker { }; + ditaa = callPackage ../tools/graphics/ditaa { }; dlx = callPackage ../misc/emulators/dlx { };