1 { lib, stdenv, rustPlatform, fetchFromGitHub }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 hash = "sha256-0c2QJUEQwKEzzDBDP5XdX7xe1rivazsoZtepB4Dxp/c=";
14 cargoHash = "sha256-RZgdWhVBZozYxbbNslCBLhN6EnogpyVXvht6GbzLnPs=";
16 # fixes `thread 'main' panicked at 'cannot find strip'` on x86_64-darwin
17 env = lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) {
18 TARGET_STRIP = "${stdenv.cc.targetPrefix}strip";
21 # error: linker `aarch64-linux-gnu-gcc` not found
27 mkdir -p $out/share/applications
28 cp assets/desktop/xplr.desktop $out/share/applications
30 mkdir -p $out/share/icons/hicolor/scalable/apps
31 cp assets/icon/xplr.svg $out/share/icons/hicolor/scalable/apps
33 for size in 16 32 64 128; do
34 icon_dir=$out/share/icons/hicolor/''${size}x$size/apps
36 cp assets/icon/xplr$size.png $icon_dir/xplr.png
41 description = "Hackable, minimal, fast TUI file explorer";
43 homepage = "https://xplr.dev";
44 changelog = "https://github.com/sayanarijit/xplr/releases/tag/${src.rev}";
45 license = licenses.mit;
46 maintainers = with maintainers; [ sayanarijit suryasr007 pyrox0 mimame figsoda ];