base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / pr / proton-vpn-local-agent / package.nix
blob665d032b1ac8b1fcc439887cbd7c426dbe573c06
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   rustPlatform,
6   python3,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "proton-vpn-local-agent";
11   version = "1.0.0";
12   cargoHash = "sha256-TE2iqxTC6UH7pCM1wKEwaujMenNIp4LE+oy545tGmL0=";
14   src = fetchFromGitHub {
15     owner = "ProtonVPN";
16     repo = "python-proton-vpn-local-agent";
17     rev = version;
18     hash = "sha256-I+tbVQzD4xJUsoRF8TU/2EMldVqtfxY3E7PQN3ks0mA=";
19   };
21   sourceRoot = "${src.name}/python-proton-vpn-local-agent";
23   installPhase = ''
24     # manually install the python binding
25     mkdir -p $out/${python3.sitePackages}/proton/vpn/
26     cp ./target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/libpython_proton_vpn_local_agent.so $out/${python3.sitePackages}/proton/vpn/local_agent.so
27   '';
29   meta = {
30     description = "Proton VPN local agent written in Rust with Python bindings";
31     homepage = "https://github.com/ProtonVPN/python-proton-vpn-local-agent";
32     license = lib.licenses.gpl3Only;
33     platforms = lib.platforms.linux;
34     maintainers = with lib.maintainers; [ sebtm ];
35   };