nixpkgs/pkgs/applications/file-managers/xplr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, rustPlatform, fetchFromGitHub }:
2021-04-20 20:28:35 +00:00
rustPlatform.buildRustPackage rec {
2021-05-08 15:05:47 +00:00
pname = "xplr";
2023-08-16 05:42:11 +00:00
version = "0.21.3";
2021-04-20 20:28:35 +00:00
2021-10-24 06:36:07 +00:00
src = fetchFromGitHub {
owner = "sayanarijit";
repo = pname;
rev = "v${version}";
2023-08-16 05:42:11 +00:00
sha256 = "sha256-lqFhLCOLiuSQWhbcZUEj2xFRlZ+x1ZTVc8IJw7tJjhE=";
2021-04-20 20:28:35 +00:00
};
2023-08-16 05:42:11 +00:00
cargoHash = "sha256-3hrpg2cMvIuFy6mH1/1igIpU4nbzFQLCAhiIRZbTuaI=";
# fixes `thread 'main' panicked at 'cannot find strip'` on x86_64-darwin
env = lib.optionalAttrs (stdenv.isx86_64 && stdenv.isDarwin) {
TARGET_STRIP = "${stdenv.cc.targetPrefix}strip";
};
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config
'';
2021-04-20 20:28:35 +00:00
2023-09-22 22:23:32 +00:00
postInstall = ''
mkdir -p $out/share
cp assets/desktop/xplr.desktop $out/share
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
'';
2021-04-20 20:28:35 +00:00
meta = with lib; {
description = "A hackable, minimal, fast TUI file explorer";
2022-05-29 14:59:48 +00:00
homepage = "https://xplr.dev";
2023-08-22 15:58:36 +00:00
changelog = "https://github.com/sayanarijit/xplr/releases/tag/${src.rev}";
2021-04-20 20:28:35 +00:00
license = licenses.mit;
2023-08-22 15:58:36 +00:00
maintainers = with maintainers; [ sayanarijit suryasr007 thehedgeh0g mimame figsoda ];
2021-04-20 20:28:35 +00:00
};
}