Files
nixpkgs/pkgs/by-name/po/pop-launcher/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

79 lines
1.9 KiB
Nix

{
stdenv,
rustPlatform,
fetchFromGitHub,
lib,
just,
pkg-config,
fd,
libqalculate,
libxkbcommon,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "pop-launcher";
version = "1.2.7";
src = fetchFromGitHub {
owner = "pop-os";
repo = "launcher";
tag = finalAttrs.version;
hash = "sha256-Db3Lj1GuhoEP2iMwgEF8HnGAUkz0IIr3ZQWmNd1EaOY=";
};
nativeBuildInputs = [
just
pkg-config
];
buildInputs = [
libxkbcommon
];
cargoHash = "sha256-9gYfQQQd/W3QQFavbLiJVFQDs0dkZtHDm3xNXZPzhLc=";
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 \
--replace-fail '/usr/lib/pop-launcher' "$out/share/pop-launcher"
substituteInPlace plugins/src/calc/mod.rs \
--replace-fail 'Command::new("qalc")' 'Command::new("${libqalculate}/bin/qalc")'
substituteInPlace plugins/src/find/mod.rs \
--replace-fail 'spawn("fd")' 'spawn("${fd}/bin/fd")'
substituteInPlace plugins/src/terminal/mod.rs \
--replace-fail '/usr/bin/gnome-terminal' 'gnome-terminal'
'';
meta = {
description = "Modular IPC-based desktop launcher service";
homepage = "https://github.com/pop-os/launcher";
platforms = lib.platforms.linux;
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ samhug ];
mainProgram = "pop-launcher";
teams = [ lib.teams.cosmic ];
};
})