NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.32k stars 13.56k forks source link

Package request: oxyromon #302098

Open keenanweaver opened 5 months ago

keenanweaver commented 5 months ago

Project description

oxyROMon is a cross-platform opinionated CLI ROM organizer written in Rust.

Metadata


Add a :+1: reaction to issues you find important.

ByteSudoer commented 5 months ago

Hello @keenanweaver . I wrote this derivation so far: oxyromon has a server cargo feature to enable WebUI so I will try to create a nix module to customize the installation process. Would you mind testing the build so far. And I will keep you updated

{ lib
, fetchFromGitHub
, rustPlatform

, makeWrapper
, pkg-config

, bchunk
, cdrkit
, ctrtool
, dolphin
, mame
, maxcso
, nsz
, p7zip
, wiimms-iso-tools
}:

let
  use_native_tls = false;
in

rustPlatform.buildRustPackage rec {
  pname = "oxyromon";
  version = "0.18.1";

  src = fetchFromGitHub {
    owner = "alucryd";
    repo = "oxyromon";
    rev = "${version}";
    hash = "sha256-+h1FjQrAqainrBiSLOCCpC3XsAAGaaqjCGK8sbXMXgI=";
  };

  cargoHash = "sha256-R/C6moL/H46Z42MjY4bP/29XgParE3aeYNb0lbe3Gm4=";

  nativeBuildInputs = [
    pkg-config
    makeWrapper
  ];
  buildInputs = [
    bchunk
    cdrkit
    ctrtool
    dolphin
    p7zip
    mame.tools
    maxcso
    nsz
    wiimms-iso-tools
  ];
  dontWrapQtApps = true;
  postInstall = ''
    wrapProgram $out/bin/oxyromon \
      --prefix PATH : ${lib.makeBinPath buildInputs} \
  '';

  # Apparently requires internet
  doCheck = false;

  meta = with lib; {
    homepage = "https://github.com/alucryd/oxyromon";
    description = "Rusty ROM organizer";
    longDescription = ''
      oxyROMon is a cross-platform opinionated CLI ROM organizer written in Rust.
      Like most ROM managers, it checks ROM files against known good databases.
      It is designed with archiving in mind, as such it only supports original and lossless ROM formats.
      It can however export in various popular lossy formats, leaving the lossless ROM files untouched.
      Sorting can be done in regions mode, in so-called 1G1R mode, or both.
      Console, computer and arcade (WIP) systems are supported using Logiqx DAT files.
      The first two require No-Intro or Redump DAT files, while the latter makes use MAME or FBNeo DAT files.
    '';
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ ByteSudoer ];
    platforms = platforms.unix;
  };

}
keenanweaver commented 5 months ago

oxyromon has a server cargo feature to enable WebUI so I will try to create a nix module to customize the installation process.

Sounds great!

Would you mind testing the build so far

Here's what I've observed so far. Functionality is all there. Running through the quick start and changing configs/running various options all works. Downloading Redump DATs, importing, converting, etc. The only command that doesn't appear to work is oxyromon info, which just hangs indefinitely. Possibly an upstream issue.

One observation. In the buildInputs, you have dolphin. Shouldn't it be dolphin-emu for the dolphin-tool RVZ support? For isoinfo you might be able to use one of these.