2024-01-08 16:18:01 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, just
|
|
|
|
, pkg-config
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, libxkbcommon
|
|
|
|
, wayland
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cosmic-applibrary";
|
2024-03-08 20:40:13 +01:00
|
|
|
version = "0-unstable-2024-02-09";
|
2024-01-08 16:18:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pop-os";
|
|
|
|
repo = pname;
|
2024-03-08 20:40:13 +01:00
|
|
|
rev = "e214e9867876c96b24568d8a45aaca2936269d9b";
|
|
|
|
hash = "sha256-fZxDRktiHHmj7X3e5VyJJMO081auOpSMSsBnJdhhtR8=";
|
2024-01-08 16:18:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-03-08 20:40:13 +01:00
|
|
|
"accesskit-0.12.2" = "sha256-ksaYMGT/oug7isQY8/1WD97XDUsX2ShBdabUzxWffYw=";
|
2024-01-08 16:18:01 +01:00
|
|
|
"atomicwrites-0.4.2" = "sha256-QZSuGPrJXh+svMeFWqAXoqZQxLq/WfIiamqvjJNVhxA=";
|
2024-03-08 20:40:13 +01:00
|
|
|
"cosmic-config-0.1.0" = "sha256-ETNVJ4y7EraAlU9XEZGNNPdyWt1WIURr1dSH6hQ0Pos=";
|
|
|
|
"cosmic-client-toolkit-0.1.0" = "sha256-vj7Wm1uJ5ULvGNEwKznNhujCZQiuntsWMyKQbIVaO/Q=";
|
|
|
|
"cosmic-settings-daemon-0.1.0" = "sha256-z/dvRyc3Zc1fAQh2HKk6NI6QSDpNqarqslwszjU+0nc=";
|
|
|
|
"glyphon-0.5.0" = "sha256-j1HrbEpUBqazWqNfJhpyjWuxYAxkvbXzRKeSouUoPWg=";
|
2024-01-08 16:18:01 +01:00
|
|
|
"smithay-client-toolkit-0.18.0" = "sha256-2WbDKlSGiyVmi7blNBr2Aih9FfF2dq/bny57hoA4BrE=";
|
2024-03-08 20:40:13 +01:00
|
|
|
"softbuffer-0.4.1" = "sha256-CACVCnyFgefkpDlll6IeaPWB8a3gbF6BW8MnlkytV8o=";
|
|
|
|
"switcheroo-control-0.1.0" = "sha256-ztZ5HD1hEOvsUSn94ZbbJ6SY9Jbsm8iGHR70GuAnEaQ=";
|
2024-01-08 16:18:01 +01:00
|
|
|
"taffy-0.3.11" = "sha256-SCx9GEIJjWdoNVyq+RZAGn0N71qraKZxf9ZWhvyzLaI=";
|
2024-03-08 20:40:13 +01:00
|
|
|
"cosmic-text-0.11.1" = "sha256-lyBl0VAzcKBqLeCPrA28VW6O0MWXazJg1b11YuBR65U=";
|
|
|
|
"d3d12-0.19.0" = "sha256-usrxQXWLGJDjmIdw1LBXtBvX+CchZDvE8fHC0LjvhD4=";
|
2024-01-08 16:18:01 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-08 20:40:13 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
just
|
|
|
|
pkg-config
|
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
libxkbcommon
|
|
|
|
wayland
|
|
|
|
];
|
2024-01-08 16:18:01 +01:00
|
|
|
|
|
|
|
dontUseJustBuild = true;
|
|
|
|
|
|
|
|
justFlags = [
|
|
|
|
"--set"
|
|
|
|
"prefix"
|
|
|
|
(placeholder "out")
|
|
|
|
"--set"
|
|
|
|
"bin-src"
|
|
|
|
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-app-library"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/cosmic-app-library \
|
2024-03-08 20:40:13 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ wayland ]}"
|
2024-01-08 16:18:01 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/pop-os/cosmic-applibrary";
|
|
|
|
description = "Application Template for the COSMIC Desktop Environment";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ nyanbinary ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
mainProgram = "cosmic-app-library";
|
|
|
|
};
|
|
|
|
}
|