summary refs log tree commit diff
diff options
context:
space:
mode:
authormidchildan <git@midchildan.org>2021-03-26 01:32:39 +0900
committermidchildan <git@midchildan.org>2021-04-02 10:59:09 +0900
commit31a3099d4b4b6dabc8e3ee614b219138a1f72cab (patch)
tree525cbd42b7c382a54891e21e8821dc39af8cf76b
parenta7540bb90adb40b7961e9dbcbf2fc74e784edf71 (diff)
downloadnixpkgs-31a3099d4b4b6dabc8e3ee614b219138a1f72cab.tar
nixpkgs-31a3099d4b4b6dabc8e3ee614b219138a1f72cab.tar.gz
nixpkgs-31a3099d4b4b6dabc8e3ee614b219138a1f72cab.tar.bz2
nixpkgs-31a3099d4b4b6dabc8e3ee614b219138a1f72cab.tar.lz
nixpkgs-31a3099d4b4b6dabc8e3ee614b219138a1f72cab.tar.xz
nixpkgs-31a3099d4b4b6dabc8e3ee614b219138a1f72cab.tar.zst
nixpkgs-31a3099d4b4b6dabc8e3ee614b219138a1f72cab.zip
dislocker: add darwin build
-rw-r--r--pkgs/tools/filesystems/dislocker/default.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/tools/filesystems/dislocker/default.nix b/pkgs/tools/filesystems/dislocker/default.nix
index e65e4665bd5..10559985f86 100644
--- a/pkgs/tools/filesystems/dislocker/default.nix
+++ b/pkgs/tools/filesystems/dislocker/default.nix
@@ -1,6 +1,8 @@
 { lib, stdenv
 , fetchFromGitHub
+, fetchpatch
 , cmake
+, pkg-config
 , mbedtls
 , fuse
 }:
@@ -17,7 +19,20 @@ stdenv.mkDerivation rec {
     sha256 = "1ak68s1v5dwh8y2dy5zjybmrh0pnqralmyqzis67y21m87g47h2k";
   };
 
-  nativeBuildInputs = [ cmake ];
+  patches = [
+    # This patch
+    #   1. adds support for the latest FUSE on macOS
+    #   2. uses pkg-config to find libfuse instead of searching in predetermined
+    #      paths
+    #
+    # https://github.com/Aorimn/dislocker/pull/246
+    (fetchpatch {
+      url = "https://github.com/Aorimn/dislocker/commit/7744f87c75fcfeeb414d0957771042b10fb64e62.diff";
+      sha256 = "0bpyccbbfjsidsrd2q9qylb95nvi8g3glb3jss7xmhywj86bhzr5";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [ fuse mbedtls ];
 
   meta = with lib; {
@@ -25,6 +40,6 @@ stdenv.mkDerivation rec {
     homepage    = "https://github.com/aorimn/dislocker";
     license     = licenses.gpl2;
     maintainers = with maintainers; [ elitak ];
-    platforms   = platforms.linux;
+    platforms   = platforms.unix;
   };
 }