pop-launcher: 1.2.1 -> 1.2.4 (#349835)

This commit is contained in:
Aleksana 2024-10-24 16:29:52 +08:00 committed by GitHub
commit c68a24a2a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3346 additions and 29 deletions

3297
pkgs/by-name/po/pop-launcher/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,64 @@
{ rustPlatform
, fetchFromGitHub
, lib
, fd
, libqalculate
{
stdenv,
rustPlatform,
fetchFromGitHub,
lib,
just,
pkg-config,
fd,
libqalculate,
libxkbcommon,
}:
rustPlatform.buildRustPackage rec {
pname = "pop-launcher";
version = "1.2.1";
version = "1.2.4";
src = fetchFromGitHub {
owner = "pop-os";
repo = "launcher";
rev = version;
hash = "sha256-BQAO9IodZxGgV8iBmUaOF0yDbAMVDFslKCqlh3pBnb0=";
hash = "sha256-CLpquNgdtnGMlMpGLv72WZmizalvYPfMWlE/qLprVrs=";
};
nativeBuildInputs = [
just
pkg-config
];
buildInputs = [
libxkbcommon
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"cosmic-client-toolkit-0.1.0" = "sha256-6XM6kcM2CEGAziCkal4uO0EL1nEWOKb3rFs7hFh6r7Y=";
"switcheroo-control-0.1.0" = "sha256-mklNPKVMO6iFrxki2DwiL5K78KiWpGxksisYldaASIE=";
};
};
cargoBuildFlags = [
"--package"
"pop-launcher-bin"
];
cargoTestFlags = [
"--package"
"pop-launcher-bin"
];
dontUseJustBuild = true;
dontUseJustCheck = true;
justFlags = [
"--set"
"base-dir"
(placeholder "out")
"--set"
"target-dir"
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release"
];
postPatch = ''
substituteInPlace justfile --replace-fail '#!/usr/bin/env' "#!$(command -v env)"
substituteInPlace src/lib.rs \
--replace-fail '/usr/lib/pop-launcher' "$out/share/pop-launcher"
substituteInPlace plugins/src/scripts/mod.rs \
@ -29,28 +71,6 @@ rustPlatform.buildRustPackage rec {
--replace-fail '/usr/bin/gnome-terminal' 'gnome-terminal'
'';
cargoHash = "sha256-cTvrq0fH057UIx/O9u8zHMsg+psMGg1q9klV5OMxtok=";
cargoBuildFlags = [ "--package" "pop-launcher-bin" ];
postInstall = ''
mv $out/bin/pop-launcher{-bin,}
plugins_dir=$out/share/pop-launcher/plugins
scripts_dir=$out/share/pop-launcher/scripts
mkdir -p $plugins_dir $scripts_dir
for plugin in $(find plugins/src -mindepth 1 -maxdepth 1 -type d -printf '%f\n'); do
mkdir $plugins_dir/$plugin
cp plugins/src/$plugin/*.ron $plugins_dir/$plugin
ln -sf $out/bin/pop-launcher $plugins_dir/$plugin/$(echo $plugin | sed 's/_/-/')
done
for script in scripts/*; do
cp -r $script $scripts_dir
done
'';
meta = with lib; {
description = "Modular IPC-based desktop launcher service";
homepage = "https://github.com/pop-os/launcher";