about summary refs log tree commit diff
path: root/pkgs/servers/interlock
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-06-24 00:31:15 +0300
committerAzat Bahawi <azat@bahawi.net>2022-06-24 00:36:16 +0300
commit4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756 (patch)
tree23a018739dffcb5a097bf289b14372e85ebb714e /pkgs/servers/interlock
parent547a5c5b4147ea2b76e6ff97af1426c5a3ba27ca (diff)
downloadnixlib-4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756.tar
nixlib-4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756.tar.gz
nixlib-4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756.tar.bz2
nixlib-4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756.tar.lz
nixlib-4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756.tar.xz
nixlib-4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756.tar.zst
nixlib-4ea3d5e65d0b9e1e3a3e87d415cc935ee4848756.zip
interlock: 2016.04.13 -> 2020.03.05
Diffstat (limited to 'pkgs/servers/interlock')
-rw-r--r--pkgs/servers/interlock/default.nix48
-rw-r--r--pkgs/servers/interlock/deps.nix65
2 files changed, 32 insertions, 81 deletions
diff --git a/pkgs/servers/interlock/default.nix b/pkgs/servers/interlock/default.nix
index e151c9ec45e3..1fbe7444491c 100644
--- a/pkgs/servers/interlock/default.nix
+++ b/pkgs/servers/interlock/default.nix
@@ -1,27 +1,28 @@
-{ sudo, coreutils, systemd, cryptsetup
-, mount, umount
-, buildGoPackage, fetchFromGitHub }:
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, coreutils
+, cryptsetup
+, mount
+, systemd
+, umount
+}:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "interlock";
-  version = "2016.04.13";
-  rev = "v${version}";
-
-  goPackagePath = "github.com/inversepath/interlock";
-
-  subPackages = [ "./cmd/interlock" ];
+  version = "2020.03.05";
 
   src = fetchFromGitHub {
-    inherit rev;
-    owner = "inversepath";
+    owner = "usbarmory";
     repo = "interlock";
-    sha256 = "06aqx3jy744yx29xyg8ips0dw16186hfqbxdv3hfrmwxmaxhl4lz";
+    rev = "v${version}";
+    sha256 = "sha256-YXa4vErt3YnomTKAXCv8yUVhcc0ST47n9waW5E8QZzY=";
   };
 
-  goDeps = ./deps.nix;
+  vendorSha256 = "sha256-OL6I95IpyTIc8wCwD9nWxVUTrmZH6COhsd/YwNTyvN0=";
+
+  ldflags = [ "-s" "-w" ];
 
-  nativeBuildInputs = [ sudo ];
-  tags = [ "textsecure" ];
   postPatch = ''
     grep -lr '/s\?bin/' | xargs sed -i \
       -e 's|/bin/mount|${mount}/bin/mount|' \
@@ -34,4 +35,19 @@ buildGoPackage rec {
       -e 's|/usr/bin/sudo|/run/wrappers/bin/sudo|' \
       -e 's|/sbin/cryptsetup|${cryptsetup}/bin/cryptsetup|'
   '';
+
+  postInstall = ''
+    mkdir -p $out/share
+    cp -R $src/static $out/share
+  '';
+
+  # Tests are broken due to an error during key generation.
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://github.com/usbarmory/interlock";
+    description = "File encryption tool and an HSM frontend";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
 }
diff --git a/pkgs/servers/interlock/deps.nix b/pkgs/servers/interlock/deps.nix
deleted file mode 100644
index be5c05295731..000000000000
--- a/pkgs/servers/interlock/deps.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-[
-  {
-    goPackagePath = "gopkg.in/yaml.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/yaml.v2";
-      rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
-      sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/crypto";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/crypto";
-      rev = "575fdbe86e5dd89229707ebec0575ce7d088a4a6";
-      sha256 = "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa";
-    };
-  }
-  {
-    goPackagePath = "github.com/Sirupsen/logrus";
-    fetch = {
-      type = "git";
-      url = "https://github.com/Sirupsen/logrus";
-      rev = "be52937128b38f1d99787bb476c789e2af1147f1";
-      sha256 = "1m6vvd4pg4lwglhk54lv5mf6cc8h7bi0d9zb3gar4crz531r66y4";
-    };
-  }
-  {
-    goPackagePath = "github.com/agl/ed25519";
-    fetch = {
-      type = "git";
-      url = "https://github.com/agl/ed25519";
-      rev = "278e1ec8e8a6e017cd07577924d6766039146ced";
-      sha256 = "165d89cc6dl28j4hkn86pny0jz3sa6hamzdvpvwdj4iha3x6lzc9";
-    };
-  }
-  {
-    goPackagePath = "github.com/golang/protobuf";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golang/protobuf";
-      rev = "59b73b37c1e45995477aae817e4a653c89a858db";
-      sha256 = "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa";
-    };
-  }
-  {
-    goPackagePath = "github.com/janimo/textsecure";
-    fetch = {
-      type = "git";
-      url = "https://github.com/janimo/textsecure";
-      rev = "c38f429e48d6b2776d17b4171f216f132185b0f6";
-      sha256 = "191pwgfgphr0x04dwpvniax4wilpv52l25bw7d3igvnw302y7i94";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/net";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/net";
-      rev = "62ac18b461605b4be188bbc7300e9aa2bc836cd4";
-      sha256 = "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p";
-    };
-  }
-]