11 , wrapperDir ? "/run/wrappers/bin"
17 src = fetchFromGitHub {
21 hash = "sha256-mA5otgqXQAw2UYUOJaC1zyJuzEu2OS/pxmjJnWsVdxs=";
25 inherit pname version src;
26 vendorHash = "sha256-OOiiKtKb+BiFkoSBUQQfqm4dMfDW3Is+30Kwcdg8LNA=";
28 nativeBuildInputs = [ pkg-config installShellFiles wrapGAppsHook3 ];
29 buildInputs = [ webkitgtk_4_1 glib fuse glib-networking ];
31 ldflags = [ "-X github.com/jstaf/onedriver/cmd/common.commit=v${version}" ];
35 "cmd/onedriver-launcher"
39 echo "Running postInstall"
40 install -Dm644 ./pkg/resources/onedriver.svg $out/share/icons/onedriver/onedriver.svg
41 install -Dm644 ./pkg/resources/onedriver.png $out/share/icons/onedriver/onedriver.png
42 install -Dm644 ./pkg/resources/onedriver-128.png $out/share/icons/onedriver/onedriver-128.png
44 install -Dm644 ./pkg/resources/onedriver.desktop $out/share/applications/onedriver.desktop
45 install -Dm644 ./pkg/resources/onedriver@.service $out/lib/systemd/user/onedriver@.service
47 mkdir -p $out/share/man/man1
48 installManPage ./pkg/resources/onedriver.1
50 substituteInPlace $out/share/applications/onedriver.desktop \
51 --replace "/usr/bin/onedriver-launcher" "$out/bin/onedriver-launcher" \
52 --replace "/usr/share/icons" "$out/share/icons"
54 substituteInPlace $out/lib/systemd/user/onedriver@.service \
55 --replace "/usr/bin/onedriver" "$out/bin/onedriver" \
56 --replace "/usr/bin/fusermount" "${wrapperDir}/fusermount"
60 description = "Network filesystem for Linux";
62 onedriver is a network filesystem that gives your computer direct access to your files on Microsoft OneDrive.
63 This is not a sync client. Instead of syncing files, onedriver performs an on-demand download of files when
64 your computer attempts to use them. onedriver allows you to use files on OneDrive as if they were files on
67 inherit (src.meta) homepage;
68 license = licenses.gpl3Plus;
69 maintainers = [ maintainers.massimogengarelli ];
70 platforms = platforms.linux;