diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-08-31 10:04:20 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-08-31 10:04:20 +0200 |
commit | ad1d58c6227abf2a9c80311eb09166a532384ed2 (patch) | |
tree | 852498ff298f9b01c0d2c8b4c883da1a00912260 /pkgs/tools/security | |
parent | ebe4fd146b29c92fb59f243f75e46afc9f1a9048 (diff) | |
parent | fc74ba8291a8a93cba428de6bc2e7c8c7f9330f4 (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r-- | pkgs/tools/security/ripasso/cursive.nix | 30 | ||||
-rw-r--r-- | pkgs/tools/security/vault/default.nix | 33 | ||||
-rw-r--r-- | pkgs/tools/security/verifpal/default.nix | 38 | ||||
-rw-r--r-- | pkgs/tools/security/verifpal/deps.nix | 12 |
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 000000000000..9eac6b6e5ca4 --- /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 45879ce1f309..c0fa221c9691 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 000000000000..3b72cf3bd53e --- /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 000000000000..aaa4269416a6 --- /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"; + }; + } +] |