chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / sp / spacedrive / package.nix
blob89fa1d158208ab3757b11e3ce8855c036142d6b4
2   lib,
3   stdenv,
4   fetchurl,
5   undmg,
6   nix-update-script,
7   #linux required
8   autoPatchelfHook,
9   dpkg,
10   gdk-pixbuf,
11   glib,
12   gst_all_1,
13   libsoup,
14   webkitgtk_4_1,
15   xdotool,
18 let
19   pname = "spacedrive";
20   version = "0.4.2";
22   src =
23     fetchurl
24       {
25         aarch64-darwin = {
26           url = "https://github.com/spacedriveapp/spacedrive/releases/download/${version}/Spacedrive-darwin-aarch64.dmg";
27           hash = "sha256-W0nFNmBgrypTj1Y6r6vstdL0UUaP9jTOH5RgAirwxsY=";
28         };
29         x86_64-darwin = {
30           url = "https://github.com/spacedriveapp/spacedrive/releases/download/${version}/Spacedrive-darwin-x86_64.dmg";
31           hash = "sha256-iX7aUs2k1fjOoDxkgXbePEYXYKFK3rGFlN9b0+gz378=";
32         };
33         x86_64-linux = {
34           url = "https://github.com/spacedriveapp/spacedrive/releases/download/${version}/Spacedrive-linux-x86_64.deb";
35           hash = "sha256-SbuL96xNEOPZ3Z5jd0gfJtNkUoEjO4W+P7K9mvyNmHA=";
36         };
37       }
38       .${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported.");
40   meta = {
41     description = "Open source file manager, powered by a virtual distributed filesystem";
42     homepage = "https://www.spacedrive.com";
43     changelog = "https://github.com/spacedriveapp/spacedrive/releases/tag/${version}";
44     platforms = [
45       "aarch64-darwin"
46       "x86_64-darwin"
47       "x86_64-linux"
48     ];
49     license = lib.licenses.agpl3Plus;
50     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
51     maintainers = with lib.maintainers; [
52       DataHearth
53       heisfer
54       mikaelfangel
55       stepbrobd
56     ];
57     mainProgram = "spacedrive";
58   };
60   passthru.updateScript = nix-update-script { };
62 if stdenv.hostPlatform.isDarwin then
63   stdenv.mkDerivation {
64     inherit
65       pname
66       version
67       src
68       meta
69       passthru
70       ;
72     sourceRoot = "Spacedrive.app";
74     nativeBuildInputs = [ undmg ];
76     installPhase = ''
77       runHook preInstall
79       mkdir -p "$out/Applications/Spacedrive.app"
80       cp -r . "$out/Applications/Spacedrive.app"
81       mkdir -p "$out/bin"
82       ln -s "$out/Applications/Spacedrive.app/Contents/MacOS/Spacedrive" "$out/bin/spacedrive"
84       runHook postInstall
85     '';
86   }
88 else
89   stdenv.mkDerivation {
90     inherit
91       pname
92       version
93       src
94       meta
95       passthru
96       ;
98     nativeBuildInputs = [
99       autoPatchelfHook
100       dpkg
101     ];
103     # Depends: libc6, libxdo3, libwebkit2gtk-4.1-0, libgtk-3-0
104     # Recommends: gstreamer1.0-plugins-ugly
105     # Suggests: gstreamer1.0-plugins-bad
106     buildInputs = [
107       xdotool
108       glib
109       libsoup
110       webkitgtk_4_1
111       gdk-pixbuf
112       gst_all_1.gst-plugins-ugly
113       gst_all_1.gst-plugins-bad
114       gst_all_1.gst-plugins-base
115       gst_all_1.gstreamer
116     ];
118     unpackPhase = ''
119       runHook preUnpack
121       dpkg-deb -x $src .
123       runHook postUnpack
124     '';
126     installPhase = ''
127       runHook preInstall
129       mkdir -p $out/bin
130       cp -r usr/share $out/
131       cp -r usr/lib $out/
132       cp -r usr/bin $out/
134       runHook postInstall
135     '';
136   }