2022-06-26 00:40:46 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, just, runtimeShell }:
|
2021-12-02 13:44:37 +00:00
|
|
|
|
2022-06-26 00:40:46 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-12-02 13:44:37 +00:00
|
|
|
pname = "pop-launcher";
|
2022-06-26 00:40:46 +00:00
|
|
|
version = "1.2.1";
|
2021-12-02 13:44:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pop-os";
|
|
|
|
repo = "launcher";
|
|
|
|
rev = version;
|
2022-06-26 00:40:46 +00:00
|
|
|
sha256 = "sha256-BQAO9IodZxGgV8iBmUaOF0yDbAMVDFslKCqlh3pBnb0=";
|
2021-12-02 13:44:37 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 00:40:46 +00:00
|
|
|
cargoSha256 = "sha256-cTvrq0fH057UIx/O9u8zHMsg+psMGg1q9klV5OMxtok=";
|
2021-12-02 13:44:37 +00:00
|
|
|
|
|
|
|
# Replace the distribution plugins path since it is only usable with traditional Linux distros.
|
2022-06-26 00:40:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace justfile --replace "#!/usr/bin/env sh" "#!${runtimeShell}"
|
|
|
|
substituteInPlace src/lib.rs --replace "/usr/lib/pop-launcher" "$out/share/pop-launcher"
|
|
|
|
substituteInPlace plugins/src/scripts/mod.rs --replace "/usr/lib/pop-launcher" "$out/share/pop-launcher"
|
2021-12-02 13:44:37 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-26 00:40:46 +00:00
|
|
|
nativeBuildInputs = [ just ];
|
|
|
|
buildPhase = "just";
|
|
|
|
installPhase = "just base_dir=$out/ install";
|
2021-12-02 13:44:37 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Modular IPC-based desktop launcher service";
|
|
|
|
homepage = "https://github.com/pop-os/launcher";
|
2022-04-16 16:33:58 +00:00
|
|
|
license = licenses.mpl20;
|
2021-12-02 13:44:37 +00:00
|
|
|
};
|
|
|
|
}
|