Unverified Commit 4761daca authored by Sefa Eyeoglu's avatar Sefa Eyeoglu
Browse files

oo7: 0.3.3 -> 0.4.0

parent 3211543c
Loading
Loading
Loading
Loading

pkgs/by-name/oo/oo7/Cargo.lock

deleted100644 → 0
+0 −1977

File deleted.

Preview size limit exceeded, changes collapsed.

+9 −20
Original line number Diff line number Diff line
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  lib,
  nix-update-script,
  oo7,
  openssl,
  pkg-config,
  rustPlatform,
  testers,
}:

rustPlatform.buildRustPackage rec {
  pname = "oo7";
  version = "0.3.3";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "bilelmoussaoui";
    repo = "oo7";
    rev = version;
    hash = "sha256-KoceqJCxb61EF29Fw9UU2LCHxDR0ExR3lnt85Nqg6tg=";
    hash = "sha256-4QEFlQJt2qMf1SxP4OUP2rkmx6OjvNJ/tibuwZLRwus=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
  };
  # TODO: this won't cover tests from the client crate
  # Additionally cargo-credential will also not be built here
  buildAndTestSubdir = "cli";

  postPatch = ''
    ln -s ${./Cargo.lock} Cargo.lock
  '';
  useFetchCargoVendor = true;
  cargoHash = "sha256-WqEHYywkFcHyoT55IuTFt5tfeeEtVhNc7VhuEc0nFfk=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ openssl ];

  postInstall = ''
    install -Dm644 portal/data/oo7-portal.portal $out/share/xdg-desktop-portal/portals/oo7.portal
    install -Dm644 portal/data/oo7-portal.service $out/share/dbus-1/services/oo7-portal.service
    substituteInPlace $out/share/dbus-1/services/oo7-portal.service \
      --replace-fail "@bindir@" "$out/bin"
  '';

  passthru = {
    tests.testVersion = testers.testVersion { package = oo7; };