nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 fuse3,
7 readline,
8 pkg-config,
9 qt6,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "android-file-transfer";
14 version = "4.5";
15
16 src = fetchFromGitHub {
17 owner = "whoozle";
18 repo = "android-file-transfer-linux";
19 tag = "v${finalAttrs.version}";
20 sha256 = "sha256-G+ErwZ/F8Cl8WLSzC+5LrEWWqNZL3xDMBvx/gjkgAXk=";
21 };
22
23 patches = [ ./darwin-dont-vendor-dependencies.patch ];
24
25 nativeBuildInputs = [
26 cmake
27 readline
28 pkg-config
29 qt6.wrapQtAppsHook
30 ];
31 buildInputs = [
32 fuse3
33 qt6.qtbase
34 qt6.qttools
35 ];
36
37 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
38 mkdir $out/Applications
39 mv $out/*.app $out/Applications
40 '';
41
42 meta = {
43 description = "Reliable MTP client with minimalistic UI";
44 homepage = "https://whoozle.github.io/android-file-transfer-linux/";
45 license = lib.licenses.lgpl21Plus;
46 maintainers = [ lib.maintainers.xaverdh ];
47 platforms = lib.platforms.unix;
48 };
49})