8 rustPlatform.buildRustPackage rec {
9 pname = "pop-launcher";
12 src = fetchFromGitHub {
16 sha256 = "sha256-BQAO9IodZxGgV8iBmUaOF0yDbAMVDFslKCqlh3pBnb0=";
20 substituteInPlace src/lib.rs \
21 --replace '/usr/lib/pop-launcher' "$out/share/pop-launcher"
22 substituteInPlace plugins/src/scripts/mod.rs \
23 --replace '/usr/lib/pop-launcher' "$out/share/pop-launcher"
24 substituteInPlace plugins/src/calc/mod.rs \
25 --replace 'Command::new("qalc")' 'Command::new("${libqalculate}/bin/qalc")'
26 substituteInPlace plugins/src/find/mod.rs \
27 --replace 'spawn("fd")' 'spawn("${fd}/bin/fd")'
28 substituteInPlace plugins/src/terminal/mod.rs \
29 --replace '/usr/bin/gnome-terminal' 'gnome-terminal'
32 cargoSha256 = "sha256-cTvrq0fH057UIx/O9u8zHMsg+psMGg1q9klV5OMxtok=";
34 cargoBuildFlags = [ "--package" "pop-launcher-bin" ];
37 mv $out/bin/pop-launcher{-bin,}
39 plugins_dir=$out/share/pop-launcher/plugins
40 scripts_dir=$out/share/pop-launcher/scripts
41 mkdir -p $plugins_dir $scripts_dir
43 for plugin in $(find plugins/src -mindepth 1 -maxdepth 1 -type d -printf '%f\n'); do
44 mkdir $plugins_dir/$plugin
45 cp plugins/src/$plugin/*.ron $plugins_dir/$plugin
46 ln -sf $out/bin/pop-launcher $plugins_dir/$plugin/$(echo $plugin | sed 's/_/-/')
49 for script in scripts/*; do
50 cp -r $script $scripts_dir
55 description = "Modular IPC-based desktop launcher service";
56 homepage = "https://github.com/pop-os/launcher";
57 platforms = platforms.linux;
58 license = licenses.mpl20;
59 maintainers = with maintainers; [ samhug ];
60 mainProgram = "pop-launcher";