diff options
author | Alex Winter <git@alexwinter.net> | 2021-10-26 14:43:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 16:43:43 +0200 |
commit | d8ccdf66df8c90234eafdd8a1354599f805c9687 (patch) | |
tree | bc09cc7805b1f0746cbfb1d88a792f9521d09c3a /pkgs/tools/cd-dvd/ventoy-bin | |
parent | 47b9c1f5ec7af78ac3ec963bd76942f907f3aa80 (diff) | |
download | nixpkgs-d8ccdf66df8c90234eafdd8a1354599f805c9687.tar nixpkgs-d8ccdf66df8c90234eafdd8a1354599f805c9687.tar.gz nixpkgs-d8ccdf66df8c90234eafdd8a1354599f805c9687.tar.bz2 nixpkgs-d8ccdf66df8c90234eafdd8a1354599f805c9687.tar.lz nixpkgs-d8ccdf66df8c90234eafdd8a1354599f805c9687.tar.xz nixpkgs-d8ccdf66df8c90234eafdd8a1354599f805c9687.tar.zst nixpkgs-d8ccdf66df8c90234eafdd8a1354599f805c9687.zip |
ventoy-bin: 1.0.51 -> 1.0.56 (#141616)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/tools/cd-dvd/ventoy-bin')
-rw-r--r-- | pkgs/tools/cd-dvd/ventoy-bin/default.nix | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/pkgs/tools/cd-dvd/ventoy-bin/default.nix b/pkgs/tools/cd-dvd/ventoy-bin/default.nix index 334b3abdfc9..b5f33f7a658 100644 --- a/pkgs/tools/cd-dvd/ventoy-bin/default.nix +++ b/pkgs/tools/cd-dvd/ventoy-bin/default.nix @@ -1,6 +1,8 @@ { lib, stdenv, fetchurl, fetchpatch , autoPatchelfHook, makeWrapper , hexdump, exfat, dosfstools, e2fsprogs, xz, util-linux, bash, parted +, withGtk3 ? true, gtk3 +, withQt5 ? false, qt5 }: let arch = { @@ -9,16 +11,22 @@ let arch = { aarch64-linux = "aarch64"; mipsel-linux = "mips64el"; }.${stdenv.hostPlatform.system} or (throw "Unsupported platform ${stdenv.hostPlatform.system}"); +defaultGuiType = if withGtk3 then "gtk3" + else if withQt5 then "qt5" + else ""; in stdenv.mkDerivation rec { pname = "ventoy-bin"; - version = "1.0.51"; + version = "1.0.56"; - nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; - buildInputs = [ hexdump exfat dosfstools e2fsprogs xz util-linux bash parted ]; + nativeBuildInputs = [ autoPatchelfHook makeWrapper ] + ++ lib.optional withQt5 qt5.wrapQtAppsHook; + buildInputs = [ hexdump exfat dosfstools e2fsprogs xz util-linux bash parted ] + ++ lib.optional withGtk3 gtk3 + ++ lib.optional withQt5 qt5.qtbase; src = fetchurl { url = "https://github.com/ventoy/Ventoy/releases/download/v${version}/ventoy-${version}-linux.tar.gz"; - sha256 = "81ae02a06b132b5965dd09c9b64e000a6dafa1d57e03d8564feefda14ef1ee02"; + sha256 = "da53d51e653092a170c11dd560e0ad6fb27c497dd77ad0ba483c32935c069dea"; }; patches = [ (fetchpatch { @@ -53,12 +61,13 @@ in stdenv.mkDerivation rec { # Cleanup. case "$ARCH" in - x86_64) rm -r tool/{i386,aarch64,mips64el};; - i386) rm -r tool/{x86_64,aarch64,mips64el};; - aarch64) rm -r tool/{x86_64,i386,mips64el};; - mips64el) rm -r tool/{x86_64,i386,aarch64};; + x86_64) rm -r {tool/,VentoyGUI.}{i386,aarch64,mips64el};; + i386) rm -r {tool/,VentoyGUI.}{x86_64,aarch64,mips64el};; + aarch64) rm -r {tool/,VentoyGUI.}{x86_64,i386,mips64el};; + mips64el) rm -r {tool/,VentoyGUI.}{x86_64,i386,aarch64};; esac rm README + rm tool/"$ARCH"/Ventoy2Disk.gtk2 # Copy from "$src" to "$out". mkdir -p "$out"/bin "$VENTOY_PATH" @@ -72,6 +81,15 @@ in stdenv.mkDerivation rec { --prefix PATH : "${lib.makeBinPath buildInputs}" \ --run "cd '$VENTOY_PATH' || exit 1" done + '' + lib.optionalString (withGtk3 || withQt5) '' + echo "${defaultGuiType}" > "$VENTOY_PATH/ventoy_gui_type" + makeWrapper "$VENTOY_PATH/VentoyGUI.$ARCH" "$out/bin/ventoy-gui" \ + --prefix PATH : "${lib.makeBinPath buildInputs}" \ + --run "cd '$VENTOY_PATH' || exit 1" + '' + lib.optionalString (!withGtk3) '' + rm "$out"/share/ventoy/tool/"$ARCH"/Ventoy2Disk.gtk3 + '' + lib.optionalString (!withQt5) '' + rm "$out"/share/ventoy/tool/"$ARCH"/Ventoy2Disk.qt5 ''; meta = with lib; { |