aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-08-31 09:50:38 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-08-31 09:50:38 +0200
commitfc74ba8291a8a93cba428de6bc2e7c8c7f9330f4 (patch)
tree982675c7719f2060a550e80747dfa49c1a9d6b06 /pkgs/tools/security
parent98640fd48212f8e6552517f667bba1901f5936d4 (diff)
parent81760f32353fa7f309a49fda17d90f43ac1e9a42 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/ripasso/cursive.nix30
-rw-r--r--pkgs/tools/security/vault/default.nix33
-rw-r--r--pkgs/tools/security/verifpal/default.nix38
-rw-r--r--pkgs/tools/security/verifpal/deps.nix12
4 files changed, 91 insertions, 22 deletions
diff --git a/pkgs/tools/security/ripasso/cursive.nix b/pkgs/tools/security/ripasso/cursive.nix
new file mode 100644
index 00000000000..9eac6b6e5ca
--- /dev/null
+++ b/pkgs/tools/security/ripasso/cursive.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, rustPlatform, fetchFromGitHub, pkgconfig, ncurses, python3, openssl, libgpgerror, gpgme, xorg }:
+
+with rustPlatform;
+buildRustPackage rec {
+ version = "unstable-2019-08-27";
+ pname = "ripasso-cursive";
+
+ src = fetchFromGitHub {
+ owner = "cortex";
+ repo = "ripasso";
+ rev = "1b5ef4ae19f95f1422ba5cb09e9e689880599c40";
+ sha256 = "1lh1in8knpqz4vbsmdyd4hh8y4bfhxjciysfbq3qzdpdpihgj0nn";
+ };
+
+ cargoSha256 = "0dwaa106vj7jbgshhqpjabsr0zmkg1a5syzky7jcaasvc7r7njwl";
+ cargoBuildFlags = [ "-p ripasso-cursive" ];
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [
+ ncurses python3 openssl libgpgerror gpgme xorg.libxcb
+ ];
+
+ meta = with stdenv.lib; {
+ description = "A simple password manager written in Rust";
+ homepage = "https://github.com/cortex/ripasso";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ sgo ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix
index 45879ce1f30..c0fa221c969 100644
--- a/pkgs/tools/security/vault/default.nix
+++ b/pkgs/tools/security/vault/default.nix
@@ -1,36 +1,25 @@
-{ stdenv, fetchFromGitHub, go, gox, removeReferencesTo }:
+{ stdenv, fetchFromGitHub, buildGoModule }:
-stdenv.mkDerivation rec {
+buildGoModule rec {
pname = "vault";
- version = "1.1.3";
+ version = "1.2.2";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
rev = "v${version}";
- sha256 = "0dylwvs95crvn1p7pbyzib979rxzp4ivzvi5k4f5ivp4ygnp597s";
+ sha256 = "1xljm7xmb4ldg3wx8s9kw1spffg4ywk4r1jqfa743czd2xxmqavl";
};
- nativeBuildInputs = [ go gox removeReferencesTo ];
+ modSha256 = "13pr3piv6hrsc562qagpn1h5wckiziyfqraj13172hdglz3n2i7q";
- preBuild = ''
- patchShebangs ./
- substituteInPlace scripts/build.sh --replace 'git rev-parse HEAD' 'echo ${src.rev}'
- sed -i s/'^GIT_DIRTY=.*'/'GIT_DIRTY="+NixOS"'/ scripts/build.sh
-
- mkdir -p .git/hooks src/github.com/hashicorp
- ln -s $(pwd) src/github.com/hashicorp/vault
-
- export GOPATH=$(pwd)
- export GOCACHE="$TMPDIR/go-cache"
- '';
-
- installPhase = ''
- mkdir -p $out/bin $out/share/bash-completion/completions
-
- cp pkg/*/* $out/bin/
- find $out/bin -type f -exec remove-references-to -t ${go} '{}' +
+ buildFlagsArray = [
+ "-tags='vault'"
+ "-ldflags=\"-X github.com/hashicorp/vault/sdk/version.GitCommit='v${version}'\""
+ ];
+ postInstall = ''
+ mkdir -p $out/share/bash-completion/completions
echo "complete -C $out/bin/vault vault" > $out/share/bash-completion/completions/vault
'';
diff --git a/pkgs/tools/security/verifpal/default.nix b/pkgs/tools/security/verifpal/default.nix
new file mode 100644
index 00000000000..3b72cf3bd53
--- /dev/null
+++ b/pkgs/tools/security/verifpal/default.nix
@@ -0,0 +1,38 @@
+{ lib, fetchFromGitHub, buildGoPackage, pigeon }:
+buildGoPackage rec {
+ pname = "verifpal";
+ version = "0.2";
+
+ goPackagePath = "github.com/SymbolicSoft/verifpal";
+ goDeps = ./deps.nix;
+
+ src = fetchFromGitHub {
+ owner = "SymbolicSoft";
+ repo = pname;
+ rev = version;
+ sha256 = "08a0xvgg94k6vq91ylvgi97kpkjbw0rw172v2dzwl2rfpzkigk1r";
+ };
+
+ postPatch = ''
+ sed -e 's|/bin/echo |echo |g' -i Makefile
+ '';
+
+ buildInputs = [ pigeon ];
+
+ buildPhase = ''
+ make -C go/src/$goPackagePath parser linux
+ '';
+
+ installPhase = ''
+ mkdir -p $bin/bin
+ cp go/src/$goPackagePath/build/bin/linux/verifpal $bin/bin/
+ '';
+
+ meta = {
+ homepage = "https://verifpal.com/";
+ description = "Cryptographic protocol analysis for students and engineers";
+ maintainers = with lib.maintainers; [ zimbatm ];
+ license = with lib.licenses; [ gpl3 ];
+ platforms = ["x86_64-linux"];
+ };
+}
diff --git a/pkgs/tools/security/verifpal/deps.nix b/pkgs/tools/security/verifpal/deps.nix
new file mode 100644
index 00000000000..aaa4269416a
--- /dev/null
+++ b/pkgs/tools/security/verifpal/deps.nix
@@ -0,0 +1,12 @@
+# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
+[
+ {
+ goPackagePath = "github.com/logrusorgru/aurora";
+ fetch = {
+ type = "git";
+ url = "https://github.com/logrusorgru/aurora";
+ rev = "94edacc10f9b";
+ sha256 = "0bhwy3rrd8mwb8xjwf44nj6vmxaj5hdvayvszr1rskkmz08l5v01";
+ };
+ }
+]