Files
nixpkgs/pkgs/by-name/xp/xplr/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

59 lines
1.5 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "xplr";
version = "1.0.1";
src = fetchFromGitHub {
owner = "sayanarijit";
repo = "xplr";
rev = "v${version}";
hash = "sha256-78MHWdvWxXGcptMW3AUTYrpfdAai59x1KnW4uMaUZC8=";
};
cargoHash = "sha256-qC9KutkGLUuG7xQeO/Vg3oRqh8hCQuHisJA5diYizAg=";
# fixes `thread 'main' panicked at 'cannot find strip'` on x86_64-darwin
env = lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) {
TARGET_STRIP = "${stdenv.cc.targetPrefix}strip";
};
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config.toml
'';
postInstall = ''
mkdir -p $out/share/applications
cp assets/desktop/xplr.desktop $out/share/applications
mkdir -p $out/share/icons/hicolor/scalable/apps
cp assets/icon/xplr.svg $out/share/icons/hicolor/scalable/apps
for size in 16 32 64 128; do
icon_dir=$out/share/icons/hicolor/''${size}x$size/apps
mkdir -p $icon_dir
cp assets/icon/xplr$size.png $icon_dir/xplr.png
done
'';
meta = with lib; {
description = "Hackable, minimal, fast TUI file explorer";
mainProgram = "xplr";
homepage = "https://xplr.dev";
changelog = "https://github.com/sayanarijit/xplr/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [
sayanarijit
suryasr007
pyrox0
mimame
figsoda
];
};
}