From d30dca1cd85f87d82e997867e23d3575d7a77bca Mon Sep 17 00:00:00 2001 From: Mikael Fangel <34864484+MikaelFangel@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:09:11 +0100 Subject: [PATCH] spacedrive: init at 0.1.4 Co-authored-by: Peder Bergebakken Sundt --- pkgs/by-name/sp/spacedrive/package.nix | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/sp/spacedrive/package.nix diff --git a/pkgs/by-name/sp/spacedrive/package.nix b/pkgs/by-name/sp/spacedrive/package.nix new file mode 100644 index 000000000000..362b02043af7 --- /dev/null +++ b/pkgs/by-name/sp/spacedrive/package.nix @@ -0,0 +1,39 @@ +{ lib, appimageTools, fetchurl, pkgs }: + +let + pname = "spacedrive"; + version = "0.1.4"; + + src = fetchurl { + url = "https://github.com/spacedriveapp/spacedrive/releases/download/${version}/Spacedrive-linux-x86_64.AppImage"; + hash = "sha256-iBdW8iPuvztP0L5xLyVs7/K8yFe7kD7QwdTuKJLhB+c="; + }; + + appimageContents = appimageTools.extractType2 { inherit pname version src; }; +in appimageTools.wrapType2 { + inherit pname version src; + + extraPkgs = pkgs: + (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ pkgs.libthai ]; + + extraInstallCommands = '' + # Remove version from entrypoint + mv $out/bin/spacedrive-"${version}" $out/bin/spacedrive + + # Install .desktop files + install -Dm444 ${appimageContents}/spacedrive.desktop -t $out/share/applications + install -Dm444 ${appimageContents}/spacedrive.png -t $out/share/pixmaps + substituteInPlace $out/share/applications/spacedrive.desktop \ + --replace 'Exec=AppRun --no-sandbox %U' 'Exec=spacedrive' + ''; + + meta = with lib; { + description = "An open source file manager, powered by a virtual distributed filesystem"; + homepage = "https://www.spacedrive.com/"; + platforms = [ "x86_64-linux" ]; + license = licenses.agpl3Plus; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + maintainers = with maintainers; [ mikaelfangel heisfer ]; + mainProgram = "spacedrive"; + }; +}