NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.05k stars 14.1k forks source link

Packaging requests: acxi #210939

Open maj0e opened 1 year ago

maj0e commented 1 year ago

Project description acxi is a command line audio conversion program and audio processing program. It converts and syncs all desired source lossless files to the desired output format, and to a different directory location.

Metadata

pinn3 commented 1 year ago

This should be pretty easy to package, as it only depends on perl:

For backward compatibility, acxi requires only Perl 5.010 (or newer), so it should run on anything. Several features (copy, make directory, find files) were moved from *nix commands to Perl native commands in version 3, which should make acxi fully platform agnostic.

I think it's just a matter of downloading the man page and the script itself, then replacing the shebang in it

maj0e commented 1 year ago

Thanks for the fast response. It does set some paths to encoders/decoders, though:

my $COMMAND_FLAC = '/usr/bin/flac'; 
my $COMMAND_FFMPEG = '/usr/bin/ffmpeg';
my $COMMAND_FFPROBE = '/usr/bin/ffprobe';
my $COMMAND_LAME = '/usr/bin/lame';
my $COMMAND_OGG = '/usr/bin/oggenc';
my $COMMAND_OPUS = '/usr/bin/opusenc';
# If you are not generating checksums, you do not need this.
my $COMMAND_MD5 = '/usr/bin/md5sum';
# metaflac is required for flac to mp3, to copy over the ID3 tags, or
# for ffp checksum generator.
# If you are not doing either, you don't need this.
my $COMMAND_METAFLAC = '/usr/bin/metaflac';

I guess those paths won't be correct for nixos. These are optional, but you would need at least one for the script to be useful.

pinn3 commented 1 year ago

Ah yes you're completely right. It was even mentioned just below the section of the readme that I linked, my bad!

Seems like all of these binaries are already packaged:

Might be worth mentioning that there is a path to curl in the script as well, but it's only used for the self-update functionality so it should not be very relevant in a nix environment

maj0e commented 1 year ago

That's where I got stuck with my previous attempt of creating the package. The paths have to be substituted with the corresponding location of the derivation in the nix store. So the patch probably needs to be created in the acxi.nix file, because only there I know what e.g. pkgs.flac evaluates to. But I have no idea how to do that...

pinn3 commented 1 year ago

Could you post what you had in that attempt? Maybe I can help you out