summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/vpn-ws/default.nix
blob: 71573384d58ecd4d96889862ca7859817284b6b0 (plain)
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
{ stdenv, lib, pkgs, fetchurl,fetchFromGitHub, openssl }:
stdenv.mkDerivation rec {
  pname = "vpn-ws";
  version = "9d0e866";
  name = "${pname}-${version}";

  src = fetchFromGitHub {
    owner = "unbit";
    repo = "vpn-ws";
    rev = version;
    sha256 = "068vzrpzgksadb31khancnpkgzhdcr6kh6k9wgm77q68skwl3w0k";
  };

  patchPhase = ''
    sed -i 's/-Werror//' Makefile
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp vpn-ws vpn-ws-client $out/bin
  '';

  buildInputs = [ openssl.dev ];

  meta = {
    homepage = https://github.com/unbit/vpn-ws;
    description = "A VPN system over websockets";
    license = lib.licenses.mit;
  };
}