summary refs log tree commit diff
path: root/pkgs/tools/security/scallion/default.nix
blob: 6f0dcd1bb013feda3b15fe79ad894164ba6287c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, stdenv, fetchFromGitHub, makeWrapper, mono, openssl_1_0_2, ocl-icd }:

stdenv.mkDerivation rec {
  version = "2.1";
  pname = "scallion";

  src = fetchFromGitHub {
    owner = "lachesis";
    repo = "scallion";
    rev = "v${version}";
    sha256 = "1l9aj101xpsaaa6kmmhmq68m6z8gzli1iaaf8xaxbivq0i7vka9k";
  };

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ mono ];

  buildPhase = ''
    xbuild scallion.sln
  '';

  installPhase = ''
    mkdir -p $out/share
    cp scallion/bin/Debug/* $out/share/
    makeWrapper ${mono}/bin/mono $out/bin/scallion \
      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl_1_0_2 ocl-icd ]} \
      --add-flags $out/share/scallion.exe
  '';

  meta = with lib; {
    description = "GPU-based tor hidden service name generator";
    homepage = src.meta.homepage;
    license = licenses.mit;
    platforms = [ "x86_64-linux" ];
    maintainers = with maintainers; [ volth ];
  };
}