Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ventoy: init at 1.0.07 #86382

Closed
wants to merge 1 commit into from
Closed

Conversation

Br1ght0ne
Copy link
Member

Motivation for this change

Ventoy is a tool for creating bootable USBs that allow selecting from ISO files on the drive.
Seems to have no dependencies, and works great for me.

Latest stable release: https://github.com/ventoy/Ventoy/releases/tag/v1.0.07

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

installPhase = ''
cp -r . $out
mkdir -p $out/bin
makeWrapper $out/Ventoy2Disk.sh $out/bin/ventoy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
makeWrapper $out/Ventoy2Disk.sh $out/bin/ventoy
ln -s $out/Ventoy2Disk.sh $out/bin/ventoy

sha256 = "13raplng4bls84yfcami69wm7wb53rmv8ml9w8974ssxvidy31vc";
};

nativeBuildInputs = [ makeWrapper ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, I think

@symphorien
Copy link
Member

Can you investigate building from source ?

@symphorien
Copy link
Member

Some dependencies are not hardcoded:

  • coreutils
  • gnugrep
  • util-linux
  • probably others

So you actually need the wrapper :)

Try running it in an empty path:

Some tools can not run in current system. Please check log.txt for detail.

@Br1ght0ne
Copy link
Member Author

@symphorien Waiting for upstream to provide instructions on building from source.

OK, I will go through the script and add all the dependencies via makeBinPath to makeWrapper. Thank you!

@Pacman99
Copy link
Contributor

@filalex77 @symphorien The building from source instructions have been provided by upstream here: https://github.com/ventoy/Ventoy/blob/master/DOC/BuildVentoyFromSource.txt.

It will be difficult to do so as there are a lot of specific parts necessary for the compilation. And there are many hardcoded paths in the various install scripts. I ran grep -R "/bin" * in the source folder and this is what I got: https://pastebin.com/02Erknwt.

I am not too familiar with nixpkgs convention on binary packages, but I think it would be much more efficient to use the binary release provided by ventoy. If source code is really preferred, it would take a while to work through all the needed substitutions in the install scripts and other problems that might be encountered.

{ stdenv, fetchurl, makeWrapper }:

stdenv.mkDerivation rec {
name = "ventoy";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name = "ventoy";
pname = "ventoy";

nativeBuildInputs = [ makeWrapper ];

installPhase = ''
cp -r . $out
Copy link
Contributor

@Pacman99 Pacman99 May 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cp -r . $out
mkdir -p $out/share/ventoy $out/bin
cp -r . $out/share/ventoy

This will prevent populating the nix profile with ventoy data files

@Artturin
Copy link
Member

ping

@SuperSandro2000
Copy link
Member

@Br1ght0ne please address the review feedback.

@SuperSandro2000
Copy link
Member

Closing because author did not respond in the last months. Feel free to reopen the discussion.

@Pacman99
Copy link
Contributor

I might submit a PR for this package later then, I have something kind of ready.

@jdnixx
Copy link

jdnixx commented Mar 13, 2021

I'd still be interested in this. @Pacman99 does your version work?

@Pacman99
Copy link
Contributor

I think my method just used autopatchelf on the binaries to get them to run on nixos. But I can't seem to find the code anymore. After I got a pinephone with thumbdrives, I didn't have much use for ventoy anymore.

I looked at the compiling document and it doesn't seem that hard to replicate in a nix derivation. From what I remember though, ventoy code has to be included in the usb drive that you use it on and I'm not sure how that would work with ventoy residing in a nix derivation.

I don't have any motivation to prepare a PR for it myself, but if you get around to it, feel free to ping me I'd love to help, ventoy is a really cool piece of software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants