summary refs log tree commit diff
path: root/pkgs/os-specific/linux/fscryptctl
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2017-09-24 23:00:40 +0200
committerMichael Weiss <dev.primeos@gmail.com>2017-09-24 23:12:30 +0200
commitec075b40ec5127cd1dc42601309e32254c00a993 (patch)
tree19a3d005940862605e321df491a09b85065fae15 /pkgs/os-specific/linux/fscryptctl
parentcd4eba7c0eeb2977270c23bedd9b6e1e707e7ca2 (diff)
downloadnixpkgs-ec075b40ec5127cd1dc42601309e32254c00a993.tar
nixpkgs-ec075b40ec5127cd1dc42601309e32254c00a993.tar.gz
nixpkgs-ec075b40ec5127cd1dc42601309e32254c00a993.tar.bz2
nixpkgs-ec075b40ec5127cd1dc42601309e32254c00a993.tar.lz
nixpkgs-ec075b40ec5127cd1dc42601309e32254c00a993.tar.xz
nixpkgs-ec075b40ec5127cd1dc42601309e32254c00a993.tar.zst
nixpkgs-ec075b40ec5127cd1dc42601309e32254c00a993.zip
fscryptctl: init at 2017-09-12
Diffstat (limited to 'pkgs/os-specific/linux/fscryptctl')
-rw-r--r--pkgs/os-specific/linux/fscryptctl/default.nix32
-rw-r--r--pkgs/os-specific/linux/fscryptctl/install.patch22
2 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/fscryptctl/default.nix b/pkgs/os-specific/linux/fscryptctl/default.nix
new file mode 100644
index 00000000000..81cd95332c8
--- /dev/null
+++ b/pkgs/os-specific/linux/fscryptctl/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub }:
+
+# Don't use this for anything important yet!
+
+stdenv.mkDerivation rec {
+  name = "fscryptctl-unstable-${version}";
+  version = "2017-09-12";
+
+  goPackagePath = "github.com/google/fscrypt";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "fscryptctl";
+    rev = "f037dcf4354ce8f25d0f371b58dfe7a7ac27576f";
+    sha256 = "1dw1y6jbm2ibn7npvpw6cl28rcz0jz4as2yl6walz7ppmqbj9scf";
+  };
+
+  patches = [ ./install.patch ];
+
+  makeFlags = [ "DESTDIR=$(out)/bin" ];
+
+  meta = with stdenv.lib; {
+    description = ''
+      A low-level tool that handles raw keys and manages policies for Linux
+      filesystem encryption
+    '';
+    inherit (src.meta) homepage;
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ primeos ];
+  };
+}
diff --git a/pkgs/os-specific/linux/fscryptctl/install.patch b/pkgs/os-specific/linux/fscryptctl/install.patch
new file mode 100644
index 00000000000..11f9843bbfb
--- /dev/null
+++ b/pkgs/os-specific/linux/fscryptctl/install.patch
@@ -0,0 +1,22 @@
+--- a/Makefile	2017-09-24 22:48:19.322116085 +0200
++++ b/Makefile	2017-09-24 22:50:07.655725022 +0200
+@@ -19,7 +19,7 @@
+ CFLAGS += -O2 -Wall
+ 
+ INSTALL = install
+-DESTDIR = /usr/local/bin
++DESTDIR ?= /usr/local/bin
+ 
+ OBJECTS = $(NAME).o sha512.o
+ 
+@@ -38,8 +38,8 @@
+ 	@python -m pytest test.py -s -q
+ 
+ install: $(NAME)
+-	$(INSTALL) -d $(DEST_DIR)
+-	$(INSTALL) $(NAME) $(DEST_DIR)
++	$(INSTALL) -d $(DESTDIR)
++	$(INSTALL) $(NAME) $(DESTDIR)
+ 
+ clean:
+ 	rm -f $(OBJECTS)