2018-07-21 01:44:44 +01:00
|
|
|
{ sudo, coreutils, systemd, cryptsetup
|
2018-03-27 19:17:10 +01:00
|
|
|
, mount, umount
|
|
|
|
, buildGoPackage, fetchFromGitHub }:
|
2016-06-02 21:22:21 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "interlock";
|
2016-06-02 21:22:21 +01:00
|
|
|
version = "2016.04.13";
|
|
|
|
rev = "v${version}";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/inversepath/interlock";
|
|
|
|
|
|
|
|
subPackages = [ "./cmd/interlock" ];
|
|
|
|
|
2016-06-06 11:26:56 +01:00
|
|
|
src = fetchFromGitHub {
|
2016-06-02 21:22:21 +01:00
|
|
|
inherit rev;
|
2016-06-06 11:26:56 +01:00
|
|
|
owner = "inversepath";
|
|
|
|
repo = "interlock";
|
|
|
|
sha256 = "06aqx3jy744yx29xyg8ips0dw16186hfqbxdv3hfrmwxmaxhl4lz";
|
2016-06-02 21:22:21 +01:00
|
|
|
};
|
|
|
|
|
2016-09-10 11:04:13 +01:00
|
|
|
goDeps = ./deps.nix;
|
2016-06-02 21:22:21 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ sudo ];
|
2021-08-05 22:52:32 +01:00
|
|
|
tags = [ "textsecure" ];
|
2016-06-02 21:22:21 +01:00
|
|
|
postPatch = ''
|
|
|
|
grep -lr '/s\?bin/' | xargs sed -i \
|
2018-03-27 19:17:10 +01:00
|
|
|
-e 's|/bin/mount|${mount}/bin/mount|' \
|
|
|
|
-e 's|/bin/umount|${umount}/bin/umount|' \
|
2016-06-02 21:22:21 +01:00
|
|
|
-e 's|/bin/cp|${coreutils}/bin/cp|' \
|
|
|
|
-e 's|/bin/mv|${coreutils}/bin/mv|' \
|
|
|
|
-e 's|/bin/chown|${coreutils}/bin/chown|' \
|
|
|
|
-e 's|/bin/date|${coreutils}/bin/date|' \
|
|
|
|
-e 's|/sbin/poweroff|${systemd}/sbin/poweroff|' \
|
2017-01-29 10:11:01 +00:00
|
|
|
-e 's|/usr/bin/sudo|/run/wrappers/bin/sudo|' \
|
2016-06-02 21:22:21 +01:00
|
|
|
-e 's|/sbin/cryptsetup|${cryptsetup}/bin/cryptsetup|'
|
|
|
|
'';
|
|
|
|
}
|