Unverified Commit 0823e91e authored by Donovan Glover's avatar Donovan Glover Committed by GitHub
Browse files

cosmic-design-demo: refactor (#385355)

parents 37826841 f1580b38
Loading
Loading
Loading
Loading
+14 −24
Original line number Diff line number Diff line
@@ -3,25 +3,20 @@
  stdenv,
  fetchFromGitHub,
  rustPlatform,
  cmake,
  just,
  pkg-config,
  libcosmicAppHook,
  expat,
  libxkbcommon,
  fontconfig,
  freetype,
  wayland,
  makeBinaryWrapper,
  cosmic-icons,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage {
  pname = "cosmic-design-demo";
  version = "unstable-2024-01-08";
  version = "0-unstable-2024-01-08";

  src = fetchFromGitHub {
    owner = "pop-os";
    repo = pname;
    repo = "cosmic-design-demo";
    rev = "d58cfad46f2982982494fce27fb00ad834dc8992";
    hash = "sha256-nWkiaegSjxgyGlpjXE9vzGjiDORaRCSoZJMDv0jtvaA=";
  };
@@ -30,20 +25,18 @@ rustPlatform.buildRustPackage rec {
  cargoHash = "sha256-czfDtiSEmzmcLfpqv0/8sP8zDAEKh+pkQkGXdd5NskM=";

  nativeBuildInputs = [
    cmake
    just
    pkg-config
    makeBinaryWrapper
    libcosmicAppHook
  ];

  buildInputs = [
    libxkbcommon
    expat
    fontconfig
    freetype
    wayland
  ];

  dontUseJustBuild = true;
  dontUseJustCheck = true;

  justFlags = [
    "--unstable"
@@ -55,18 +48,15 @@ rustPlatform.buildRustPackage rec {
    "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-design-demo"
  ];

  postInstall = ''
    wrapProgram "$out/bin/cosmic-design-demo" \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ wayland ]}" \
      --suffix XDG_DATA_DIRS : "${cosmic-icons}/share"
  '';

  meta = with lib; {
  meta = {
    homepage = "https://github.com/pop-os/cosmic-design-demo";
    description = "Design Demo for the COSMIC Desktop Environment";
    license = licenses.mpl20;
    maintainers = with maintainers; [ nyabinary ];
    platforms = platforms.linux;
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [
      nyabinary
      HeitorAugustoLN
    ];
    platforms = lib.platforms.linux;
    mainProgram = "cosmic-design-demo";
  };
}