about summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-07-10 00:03:19 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-07-10 00:03:19 -0300
commit27fcfa314f921058844ec4029522f643086a7d11 (patch)
tree622e12d010a3fa1f0ae9b3c5fdfadd4275e3c213 /pkgs/tools/cd-dvd
parent7802f1b6479d6f04bea5cc94e8290ea61e210ecf (diff)
ventoy-bin: 1.0.77 -> 1.0.78
Diffstat (limited to 'pkgs/tools/cd-dvd')
-rw-r--r--pkgs/tools/cd-dvd/ventoy-bin/default.nix29
-rw-r--r--pkgs/tools/cd-dvd/ventoy-bin/ventoy-gui.desktop10
2 files changed, 23 insertions, 16 deletions
diff --git a/pkgs/tools/cd-dvd/ventoy-bin/default.nix b/pkgs/tools/cd-dvd/ventoy-bin/default.nix
index 07d73f980525a..245475a10d96f 100644
--- a/pkgs/tools/cd-dvd/ventoy-bin/default.nix
+++ b/pkgs/tools/cd-dvd/ventoy-bin/default.nix
@@ -5,6 +5,7 @@
 , autoPatchelfHook
 , bash
 , coreutils
+, copyDesktopItems
 , cryptsetup
 , dosfstools
 , e2fsprogs
@@ -15,6 +16,7 @@
 , gtk3
 , hexdump
 , makeWrapper
+, makeDesktopItem
 , ntfs3g
 , parted
 , procps
@@ -47,11 +49,11 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "ventoy-bin";
-  version = "1.0.77";
+  version = "1.0.78";
 
   src = fetchurl {
     url = "https://github.com/ventoy/Ventoy/releases/download/v${version}/ventoy-${version}-linux.tar.gz";
-    hash = "sha256-DmDWt06gjrAEZ9Qvb7qbKbfJr/u84qmQ44kfDA3HDp0=";
+    hash = "sha256-vlSnnExtuh85yGFYUBeE7BRsVwl+kn7nSaIx2d3WICk=";
   };
 
   patches = [
@@ -66,6 +68,9 @@ in stdenv.mkDerivation rec {
 
   patchFlags = [ "-p0" ];
 
+  dontConfigure = true;
+  dontBuild = true;
+
   postPatch = ''
     # Fix permissions.
     find -type f -name \*.sh -exec chmod a+x '{}' \;
@@ -79,6 +84,7 @@ in stdenv.mkDerivation rec {
     autoPatchelfHook
     makeWrapper
   ]
+  ++ lib.optional (withQt5 || withGtk3) copyDesktopItems
   ++ lib.optional withQt5 qt5.wrapQtAppsHook;
 
   buildInputs = [
@@ -103,6 +109,18 @@ in stdenv.mkDerivation rec {
   ++ lib.optional withXfs xfsprogs
   ++ lib.optional withQt5 qt5.qtbase;
 
+  desktopItems = [
+    (makeDesktopItem {
+      name = "Ventoy";
+      desktopName = "Ventoy";
+      comment = "Tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files";
+      icon = "VentoyLogo";
+      exec = "ventoy-gui";
+      terminal = false;
+      categories = [ "Utility" ];
+      startupNotify = true;
+    })];
+
   installPhase = ''
     runHook preInstall
 
@@ -146,7 +164,7 @@ in stdenv.mkDerivation rec {
     done
   ''
   # VentoGUI uses the `ventoy_gui_type` file to determine the type of GUI.
-  # See <https://github.com/ventoy/Ventoy/blob/471432fc50ffad80bde5de0b22e4c30fa3aac41b/LinuxGUI/Ventoy2Disk/ventoy_gui.c#L1044>.
+  # See: https://github.com/ventoy/Ventoy/blob/v1.0.78/LinuxGUI/Ventoy2Disk/ventoy_gui.c#L1096
   + lib.optionalString (withGtk3 || withQt5) ''
     echo "${defaultGuiType}" > "$VENTOY_PATH/ventoy_gui_type"
     makeWrapper "$VENTOY_PATH/VentoyGUI.$ARCH" "$out/bin/ventoy-gui" \
@@ -154,7 +172,6 @@ in stdenv.mkDerivation rec {
                 --chdir "$VENTOY_PATH"
     mkdir "$out"/share/{applications,pixmaps}
     ln -s "$VENTOY_PATH"/WebUI/static/img/VentoyLogo.png "$out"/share/pixmaps/
-    cp ${./ventoy-gui.desktop} "$out"/share/applications/
   ''
   + lib.optionalString (!withGtk3) ''
     rm "$VENTOY_PATH"/tool/{"$ARCH"/Ventoy2Disk.gtk3,VentoyGTK.glade}
@@ -187,9 +204,9 @@ in stdenv.mkDerivation rec {
       800+ image files are tested.  90%+ distros in DistroWatch supported.
     '';
     changelog = "https://www.ventoy.net/doc_news.html";
-    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
     license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ k4leg AndersonTorres ];
     platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "mipsel-linux" ];
-    maintainers = with maintainers; [ k4leg ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
   };
 }
diff --git a/pkgs/tools/cd-dvd/ventoy-bin/ventoy-gui.desktop b/pkgs/tools/cd-dvd/ventoy-bin/ventoy-gui.desktop
deleted file mode 100644
index a132f3bbf5a4d..0000000000000
--- a/pkgs/tools/cd-dvd/ventoy-bin/ventoy-gui.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Categories=Utility;
-Comment=Tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files
-Exec=ventoy-gui
-Hidden=false
-Icon=VentoyLogo
-Name=Ventoy
-StartupNotify=true
-Terminal=false
-Type=Application