Commit a0d3f55f authored by Cole Helbling's avatar Cole Helbling
Browse files
parent ce546c73
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
, writeText
, rustPlatform
, fetchFromGitHub
, fetchpatch
, pkg-config
, protobuf
, makeWrapper
@@ -16,16 +17,26 @@
}:
rustPlatform.buildRustPackage rec {
  pname = "mullvad";
  version = "2022.5";
  version = "2023.1";

  src = fetchFromGitHub {
    owner = "mullvad";
    repo = "mullvadvpn-app";
    rev = version;
    hash = "sha256-LiaELeEBIn/GZibKf25W3DHe+IkpaTY8UC7ca/7lp8k=";
    hash = "sha256-BoduliiDOpzEPYHAjr636e7DbrhFnC/v9au6Mp9T/Qs=";
  };

  cargoHash = "sha256-KpBhdZce8Ug3ws7f1qg+5LtOMQw2Mf/uJsBg/TZSYyk=";
  cargoHash = "sha256-5kK2IA0Z1dQbHlnGXNZHD+BycurshfpqrwcIEveWKT0=";

  patches = [
    # https://github.com/mullvad/mullvadvpn-app/pull/4389
    # can be removed after next release
    (fetchpatch {
      name = "mullvad-version-dont-check-git.patch";
      url = "https://github.com/mullvad/mullvadvpn-app/commit/8062cc74fc94bbe073189e78328901606c859d41.patch";
      hash = "sha256-1BhCId0J1dxhPM3oOmhZB+07N+k1GlvAT1h6ayfx174=";
    })
  ];

  nativeBuildInputs = [
    pkg-config
@@ -51,7 +62,7 @@ rustPlatform.buildRustPackage rec {
    # Place all binaries in the 'mullvad-' namespace, even though these
    # specific binaries aren't used in the lifetime of the program.
    ''
      for bin in relay_list translations-converter; do
      for bin in relay_list translations-converter tunnel-obfuscation; do
        mv "$out/bin/$bin" "$out/bin/mullvad-$bin"
      done
    '' +