nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 wrapGAppsHook4,
7 gdk-pixbuf,
8 gtk4,
9 libadwaita,
10}:
11
12rustPlatform.buildRustPackage (finalAttrs: {
13 pname = "fclones-gui";
14 version = "0.2.0";
15
16 src = fetchFromGitHub {
17 owner = "pkolaczk";
18 repo = "fclones-gui";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-ad7wyoCjSQ8i6c+4IorImqAY2Q6pwBtI2JkkbkGa46U=";
21 };
22
23 cargoHash = "sha256-01HNWhHfbun+Er39eN5tEmqXMGDsBQrZtVTA9R7kifo=";
24
25 nativeBuildInputs = [
26 pkg-config
27 wrapGAppsHook4
28 ];
29
30 buildInputs = [
31 gdk-pixbuf
32 gtk4
33 libadwaita
34 ];
35
36 postInstall = ''
37 substituteInPlace snap/gui/fclones-gui.desktop \
38 --replace-fail 'Icon=''${SNAP}/meta/gui/fclones-gui.png' "Icon=fclones-gui"
39 install -Dm 0644 snap/gui/fclones-gui.desktop -t $out/share/applications
40 install -Dm 0644 snap/gui/fclones-gui.png -t $out/share/icons/hicolor/256x256/apps
41 '';
42
43 meta = {
44 description = "Interactive duplicate file remover";
45 mainProgram = "fclones-gui";
46 homepage = "https://github.com/pkolaczk/fclones-gui";
47 changelog = "https://github.com/pkolaczk/fclones-gui/releases/tag/${finalAttrs.src.tag}";
48 license = lib.licenses.mit;
49 maintainers = builtins.attrValues { inherit (lib.maintainers) figsoda; };
50 };
51})