Unverified Commit 7bdc9b79 authored by Seth Flynn's avatar Seth Flynn Committed by GitHub
Browse files

oo7: 0.3.3 -> 0.4.0 (#385515)

parents 242c2b2f 3244bcff
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
{
  cargo,
  meson,
  ninja,
  oo7,
  pkg-config,
  rustPlatform,
  rustc,
  stdenv,
  systemdLibs,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "oo7-portal";
  inherit (oo7) version src cargoDeps;

  sourceRoot = "${finalAttrs.src.name}/portal";
  cargoRoot = "../";

  nativeBuildInputs = [
    pkg-config
    meson
    ninja
    rustPlatform.cargoSetupHook
    rustc
    cargo
  ];

  buildInputs = [
    systemdLibs
  ];

  meta = {
    inherit (oo7.meta)
      homepage
      changelog
      license
      maintainers
      platforms
      ;
    description = "${oo7.meta.description} (XDG Desktop Portal)";
  };
})
+42 −0
Original line number Diff line number Diff line
{
  cargo,
  meson,
  ninja,
  oo7,
  pkg-config,
  rustPlatform,
  rustc,
  stdenv,
  systemdLibs,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "oo7-server";
  inherit (oo7) version src cargoDeps;

  sourceRoot = "${finalAttrs.src.name}/server";
  cargoRoot = "../";

  nativeBuildInputs = [
    pkg-config
    meson
    ninja
    rustPlatform.cargoSetupHook
    rustc
    cargo
  ];

  buildInputs = [
    systemdLibs
  ];

  meta = {
    inherit (oo7.meta)
      homepage
      changelog
      license
      maintainers
      platforms
      ;
    description = "${oo7.meta.description} (Daemon)";
  };
})

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

deleted100644 → 0
+0 −1977

File deleted.

Preview size limit exceeded, changes collapsed.

+11 −22
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; };

    # TODO: re-enable this when upstream adds a Cargo.lock
    # updateScript = nix-update-script { };
    updateScript = nix-update-script { };
  };

  meta = with lib; {