2023-06-10 23:53:55 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2023-06-27 02:25:57 +00:00
|
|
|
, fetchFromGitHub
|
2023-06-10 23:53:55 +00:00
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook4
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "fclones-gui";
|
2023-06-28 13:45:39 +00:00
|
|
|
version = "0.2.0";
|
2023-06-10 23:53:55 +00:00
|
|
|
|
2023-06-27 02:25:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pkolaczk";
|
|
|
|
repo = "fclones-gui";
|
|
|
|
rev = "v${version}";
|
2023-06-28 13:45:39 +00:00
|
|
|
hash = "sha256-ad7wyoCjSQ8i6c+4IorImqAY2Q6pwBtI2JkkbkGa46U=";
|
2023-06-10 23:53:55 +00:00
|
|
|
};
|
|
|
|
|
2023-06-28 13:45:39 +00:00
|
|
|
cargoHash = "sha256-7+I0Tj+DcrItU2apB1iMiYiTv9AeDparke86HkJNF3A=";
|
2023-06-10 23:53:55 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
wrapGAppsHook4
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf
|
|
|
|
gtk4
|
|
|
|
libadwaita
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk_11_0.frameworks.IOKit
|
|
|
|
];
|
|
|
|
|
2023-06-28 13:45:39 +00:00
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace snap/gui/fclones-gui.desktop \
|
|
|
|
--replace Exec=fclones-gui Exec=$out/bin/fclones-gui \
|
|
|
|
--replace 'Icon=''${SNAP}/meta/gui/fclones-gui.png' Icon=fclones-gui
|
|
|
|
|
|
|
|
install -Dm444 snap/gui/fclones-gui.desktop -t $out/share/applications
|
|
|
|
install -Dm444 snap/gui/fclones-gui.png -t $out/share/pixmaps
|
|
|
|
'';
|
|
|
|
|
2023-06-10 23:53:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Interactive duplicate file remover";
|
2023-06-27 02:25:57 +00:00
|
|
|
homepage = "https://github.com/pkolaczk/fclones-gui";
|
|
|
|
changelog = "https://github.com/pkolaczk/fclones-gui/releases/tag/${src.rev}";
|
2023-06-10 23:53:55 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|