diff --git a/pkgs/applications/emulators/cdemu/analyzer.nix b/pkgs/applications/emulators/cdemu/analyzer.nix deleted file mode 100644 index e9065676e147..000000000000 --- a/pkgs/applications/emulators/cdemu/analyzer.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ - cmake, - pkg-config, - callPackage, - gobject-introspection, - wrapGAppsHook3, - python3Packages, - libxml2, - gnuplot, - adwaita-icon-theme, - gdk-pixbuf, - intltool, - libmirage, -}: -python3Packages.buildPythonApplication { - - inherit - (callPackage ./common-drv-attrs.nix { - version = "3.2.6"; - pname = "image-analyzer"; - hash = "sha256-7I8RUgd+k3cEzskJGbziv1f0/eo5QQXn62wGh/Y5ozc="; - }) - pname - version - src - meta - ; - - buildInputs = [ - libxml2 - gnuplot - libmirage - adwaita-icon-theme - gdk-pixbuf - ]; - propagatedBuildInputs = with python3Packages; [ - pygobject3 - matplotlib - ]; - nativeBuildInputs = [ - cmake - pkg-config - wrapGAppsHook3 - intltool - gobject-introspection - ]; - - pyproject = false; - dontWrapGApps = true; - preFixup = '' - makeWrapperArgs+=("''${gappsWrapperArgs[@]}") - ''; - -} diff --git a/pkgs/applications/emulators/cdemu/client.nix b/pkgs/applications/emulators/cdemu/client.nix deleted file mode 100644 index afb68755775c..000000000000 --- a/pkgs/applications/emulators/cdemu/client.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - callPackage, - python3Packages, - cmake, - pkg-config, - intltool, - wrapGAppsNoGuiHook, - gobject-introspection, -}: -python3Packages.buildPythonApplication { - - inherit - (callPackage ./common-drv-attrs.nix { - version = "3.2.5"; - pname = "cdemu-client"; - hash = "sha256-py2F61v8vO0BCM18GCflAiD48deZjbMM6wqoCDZsOd8="; - }) - pname - version - src - meta - ; - - nativeBuildInputs = [ - cmake - pkg-config - intltool - wrapGAppsNoGuiHook - gobject-introspection - ]; - propagatedBuildInputs = with python3Packages; [ - dbus-python - pygobject3 - ]; - - pyproject = false; - dontWrapGApps = true; - preFixup = '' - makeWrapperArgs+=("''${gappsWrapperArgs[@]}") - ''; - -} diff --git a/pkgs/applications/emulators/cdemu/common-drv-attrs.nix b/pkgs/applications/emulators/cdemu/common-drv-attrs.nix deleted file mode 100644 index edc3361a5fad..000000000000 --- a/pkgs/applications/emulators/cdemu/common-drv-attrs.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - lib, - fetchurl, - pname, - version, - hash, -}: - -{ - inherit pname version; - src = fetchurl { - url = "mirror://sourceforge/cdemu/${pname}-${version}.tar.xz"; - inherit hash; - }; - meta = { - description = "Suite of tools for emulating optical drives and discs"; - longDescription = '' - CDEmu consists of: - - - a kernel module implementing a virtual drive-controller - - libmirage which is a software library for interpreting optical disc images - - a daemon which emulates the functionality of an optical drive+disc - - textmode and GTK clients for controlling the emulator - - an image analyzer to view the structure of image files - - Optical media emulated by CDemu can be mounted within Linux. Automounting is also allowed. - ''; - homepage = "https://cdemu.sourceforge.io/"; - license = lib.licenses.gpl2Plus; - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ bendlas ]; - }; -} diff --git a/pkgs/applications/emulators/cdemu/daemon.nix b/pkgs/applications/emulators/cdemu/daemon.nix deleted file mode 100644 index 874b0522aa07..000000000000 --- a/pkgs/applications/emulators/cdemu/daemon.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - stdenv, - callPackage, - cmake, - pkg-config, - glib, - libao, - intltool, - libmirage, - coreutils, -}: - -let - inherit - (callPackage ./common-drv-attrs.nix { - version = "3.2.7"; - pname = "cdemu-daemon"; - hash = "sha256-EKh2G6RA9Yq46BpTAqN2s6TpLJb8gwDuEpGiwdGcelc="; - }) - pname - version - src - meta - ; -in -stdenv.mkDerivation { - inherit pname version src; - - nativeBuildInputs = [ - cmake - pkg-config - intltool - ]; - buildInputs = [ - glib - libao - libmirage - ]; - postInstall = '' - mkdir -p $out/share/dbus-1/services - cp -R ../service-example $out/share/cdemu - substitute \ - $out/share/cdemu/net.sf.cdemu.CDEmuDaemon.service \ - $out/share/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service \ - --replace /bin/true ${coreutils}/bin/true - ''; - - meta = { - inherit (meta) - description - license - longDescription - maintainers - platforms - ; - homepage = "https://cdemu.sourceforge.io/about/daemon/"; - mainProgram = "cdemu-daemon"; - }; -} diff --git a/pkgs/applications/emulators/cdemu/gui.nix b/pkgs/applications/emulators/cdemu/gui.nix deleted file mode 100644 index 90523e12ead6..000000000000 --- a/pkgs/applications/emulators/cdemu/gui.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - callPackage, - cmake, - pkg-config, - wrapGAppsHook3, - gobject-introspection, - python3Packages, - libnotify, - intltool, - adwaita-icon-theme, - gdk-pixbuf, - libappindicator-gtk3, -}: -python3Packages.buildPythonApplication { - - inherit - (callPackage ./common-drv-attrs.nix { - version = "3.2.6"; - pname = "gcdemu"; - hash = "sha256-w4vzKoSotL5Cjfr4Cu4YhNSWXJqS+n/vySrwvbhR1zA="; - }) - pname - version - src - meta - ; - - nativeBuildInputs = [ - cmake - pkg-config - wrapGAppsHook3 - intltool - gobject-introspection - ]; - buildInputs = [ - libnotify - adwaita-icon-theme - gdk-pixbuf - libappindicator-gtk3 - ]; - propagatedBuildInputs = with python3Packages; [ pygobject3 ]; - - pyproject = false; - dontWrapGApps = true; - preFixup = '' - makeWrapperArgs+=("''${gappsWrapperArgs[@]}") - ''; - -} diff --git a/pkgs/applications/emulators/cdemu/libmirage.nix b/pkgs/applications/emulators/cdemu/libmirage.nix deleted file mode 100644 index e2017be9616c..000000000000 --- a/pkgs/applications/emulators/cdemu/libmirage.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - stdenv, - callPackage, - cmake, - pkg-config, - gobject-introspection, - vala, - glib, - libsndfile, - zlib, - bzip2, - xz, - libsamplerate, - intltool, - pcre, - util-linux, - libselinux, - libsepol, -}: - -let - inherit - (callPackage ./common-drv-attrs.nix { - version = "3.2.10"; - pname = "libmirage"; - hash = "sha256-+T5Gu3VcprCkSJcq/kTySRnNI7nc+GbRtctLkzPhgK4="; - }) - pname - version - src - meta - ; -in -stdenv.mkDerivation { - inherit pname version src; - - env = { - PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0"; - PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; - }; - - buildInputs = [ - glib - libsndfile - zlib - bzip2 - xz - libsamplerate - ]; - nativeBuildInputs = [ - cmake - pkg-config - intltool - gobject-introspection - vala - ]; - propagatedBuildInputs = [ - pcre - util-linux - libselinux - libsepol - ]; - - meta = { - inherit (meta) - maintainers - license - platforms - ; - description = "CD-ROM image access library"; - homepage = "https://cdemu.sourceforge.io/about/libmirage/"; - }; -} diff --git a/pkgs/by-name/cd/cdemu-client/package.nix b/pkgs/by-name/cd/cdemu-client/package.nix new file mode 100644 index 000000000000..9e409d46fb4c --- /dev/null +++ b/pkgs/by-name/cd/cdemu-client/package.nix @@ -0,0 +1,73 @@ +{ + python3Packages, + cmake, + pkg-config, + intltool, + wrapGAppsNoGuiHook, + gobject-introspection, + fetchurl, + lib, + writeScript, +}: +python3Packages.buildPythonApplication (finalAttrs: { + pname = "cdemu-client"; + version = "3.3.0"; + + src = fetchurl { + url = "mirror://sourceforge/cdemu/cdemu-client-${finalAttrs.version}.tar.xz"; + hash = "sha256-WiKm00ZKUDeHX6RII4+JKruAzUyWzZWyI0iZeDqksnA="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + intltool + wrapGAppsNoGuiHook + gobject-introspection + ]; + + propagatedBuildInputs = with python3Packages; [ + dbus-python + pygobject3 + ]; + + pyproject = false; + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + passthru = { + updateScript = writeScript "update-cdemu-client" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre2 common-updater-scripts + + set -eu -o pipefail + + # Fetch the latest version from the SourceForge RSS feed for cdemu-client + newVersion="$(curl -s "https://sourceforge.net/projects/cdemu/rss?path=/cdemu-client" | pcre2grep -o1 'cdemu-client-([0-9.]+)\.tar\.xz' | head -n 1)" + + update-source-version cdemu-client "$newVersion" + ''; + }; + + meta = { + description = "Suite of tools for emulating optical drives and discs"; + longDescription = '' + CDEmu consists of: + + - a kernel module implementing a virtual drive-controller + - libmirage which is a software library for interpreting optical disc images + - a daemon which emulates the functionality of an optical drive+disc + - textmode and GTK clients for controlling the emulator + - an image analyzer to view the structure of image files + + Optical media emulated by CDemu can be mounted within Linux. Automounting is also allowed. + ''; + homepage = "https://cdemu.sourceforge.io/"; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ bendlas ]; + }; +}) diff --git a/pkgs/by-name/cd/cdemu-daemon/package.nix b/pkgs/by-name/cd/cdemu-daemon/package.nix new file mode 100644 index 000000000000..f25748b01c85 --- /dev/null +++ b/pkgs/by-name/cd/cdemu-daemon/package.nix @@ -0,0 +1,78 @@ +{ + stdenv, + cmake, + pkg-config, + glib, + libao, + intltool, + libmirage, + coreutils, + fetchurl, + lib, + writeScript, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "cdemu-daemon"; + version = "3.3.0"; + + src = fetchurl { + url = "mirror://sourceforge/cdemu/cdemu-daemon-${finalAttrs.version}.tar.xz"; + hash = "sha256-AYHjiOAQdu685gc6p0j2QNtCmTYTWix1kzWQZYvGPWU="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + intltool + ]; + + buildInputs = [ + glib + libao + libmirage + ]; + + postInstall = '' + mkdir -p $out/share/dbus-1/services + cp -R ../service-example $out/share/cdemu + substitute \ + $out/share/cdemu/net.sf.cdemu.CDEmuDaemon.service \ + $out/share/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service \ + --replace /bin/true ${coreutils}/bin/true + ''; + + passthru = { + updateScript = writeScript "update-cdemu-daemon" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre2 common-updater-scripts + + set -eu -o pipefail + + # Fetch the latest version from the SourceForge RSS feed for cdemu-daemon + newVersion="$(curl -s "https://sourceforge.net/projects/cdemu/rss?path=/cdemu-daemon" | pcre2grep -o1 'cdemu-daemon-([0-9.]+)\.tar\.xz' | head -n 1)" + + update-source-version cdemu-daemon "$newVersion" + ''; + }; + + meta = { + description = "Suite of tools for emulating optical drives and discs"; + longDescription = '' + CDEmu consists of: + + - a kernel module implementing a virtual drive-controller + - libmirage which is a software library for interpreting optical disc images + - a daemon which emulates the functionality of an optical drive+disc + - textmode and GTK clients for controlling the emulator + - an image analyzer to view the structure of image files + + Optical media emulated by CDemu can be mounted within Linux. Automounting is also allowed. + ''; + homepage = "https://cdemu.sourceforge.io/about/daemon/"; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ bendlas ]; + mainProgram = "cdemu-daemon"; + }; +}) diff --git a/pkgs/applications/emulators/cdemu/vhba.nix b/pkgs/by-name/cd/cdemu-daemon/vhba.nix similarity index 60% rename from pkgs/applications/emulators/cdemu/vhba.nix rename to pkgs/by-name/cd/cdemu-daemon/vhba.nix index 844c56088162..7559dd14465f 100644 --- a/pkgs/applications/emulators/cdemu/vhba.nix +++ b/pkgs/by-name/cd/cdemu-daemon/vhba.nix @@ -4,6 +4,7 @@ fetchurl, kernel, kernelModuleMakeFlags, + writeScript, }: stdenv.mkDerivation (finalAttrs: { @@ -21,6 +22,20 @@ stdenv.mkDerivation (finalAttrs: { ]; nativeBuildInputs = kernel.moduleBuildDependencies; + passthru = { + updateScript = writeScript "update-vhba-module" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre2 common-updater-scripts + + set -eu -o pipefail + + # Fetch the latest version from the SourceForge RSS feed for vhba-module + newVersion="$(curl -s "https://sourceforge.net/projects/cdemu/rss?path=/vhba-module" | pcre2grep -o1 'vhba-module-([0-9.]+)\.tar\.xz' | head -n 1)" + + update-source-version linuxPackages.vhba "$newVersion" + ''; + }; + meta = { description = "Provides a Virtual (SCSI) HBA"; homepage = "https://cdemu.sourceforge.io/about/vhba/"; diff --git a/pkgs/by-name/gc/gcdemu/package.nix b/pkgs/by-name/gc/gcdemu/package.nix new file mode 100644 index 000000000000..3cd67894358e --- /dev/null +++ b/pkgs/by-name/gc/gcdemu/package.nix @@ -0,0 +1,84 @@ +{ + cmake, + pkg-config, + wrapGAppsHook3, + gobject-introspection, + python3Packages, + libnotify, + intltool, + adwaita-icon-theme, + gdk-pixbuf, + libappindicator-gtk3, + fetchurl, + lib, + writeScript, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "gcdemu"; + version = "3.3.0"; + + src = fetchurl { + url = "mirror://sourceforge/cdemu/gcdemu-${finalAttrs.version}.tar.xz"; + hash = "sha256-C9d4Rv47kQhs2kbTCwAUcdm+dcljA8IVkwhLJHJpUS0="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + wrapGAppsHook3 + intltool + gobject-introspection + ]; + + buildInputs = [ + libnotify + adwaita-icon-theme + gdk-pixbuf + libappindicator-gtk3 + ]; + + propagatedBuildInputs = with python3Packages; [ + pygobject3 + ]; + + pyproject = false; + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + passthru = { + updateScript = writeScript "update-gcdemu" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre2 common-updater-scripts + + set -eu -o pipefail + + # Fetch the latest version from the SourceForge RSS feed for gcdemu + newVersion="$(curl -s "https://sourceforge.net/projects/cdemu/rss?path=/gcdemu" | pcre2grep -o1 'gcdemu-([0-9.]+)\.tar\.xz' | head -n 1)" + + update-source-version gcdemu "$newVersion" + ''; + }; + + meta = { + description = "Suite of tools for emulating optical drives and discs"; + longDescription = '' + CDEmu consists of: + + - a kernel module implementing a virtual drive-controller + - libmirage which is a software library for interpreting optical disc images + - a daemon which emulates the functionality of an optical drive+disc + - textmode and GTK clients for controlling the emulator + - an image analyzer to view the structure of image files + + Optical media emulated by CDemu can be mounted within Linux. Automounting is also allowed. + ''; + homepage = "https://cdemu.sourceforge.io/"; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ bendlas ]; + }; +}) diff --git a/pkgs/by-name/im/image-analyzer/package.nix b/pkgs/by-name/im/image-analyzer/package.nix new file mode 100644 index 000000000000..364286765d26 --- /dev/null +++ b/pkgs/by-name/im/image-analyzer/package.nix @@ -0,0 +1,86 @@ +{ + cmake, + pkg-config, + gobject-introspection, + wrapGAppsHook3, + python3Packages, + libxml2, + gnuplot, + adwaita-icon-theme, + gdk-pixbuf, + intltool, + libmirage, + fetchurl, + lib, + writeScript, +}: +python3Packages.buildPythonApplication (finalAttrs: { + pname = "image-analyzer"; + version = "3.3.0"; + + src = fetchurl { + url = "mirror://sourceforge/cdemu/image-analyzer-${finalAttrs.version}.tar.xz"; + hash = "sha256-N2aufwYEBVx7z2Vo7Qi4DP2MsDXXr5LrQdeNYOtNGnU="; + }; + + buildInputs = [ + libxml2 + gnuplot + libmirage + adwaita-icon-theme + gdk-pixbuf + ]; + + propagatedBuildInputs = with python3Packages; [ + pygobject3 + matplotlib + ]; + + nativeBuildInputs = [ + cmake + pkg-config + wrapGAppsHook3 + intltool + gobject-introspection + ]; + + pyproject = false; + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + passthru = { + updateScript = writeScript "update-image-analyzer" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre2 common-updater-scripts + + set -eu -o pipefail + + # Fetch the latest version from the SourceForge RSS feed for image-analyzer + newVersion="$(curl -s "https://sourceforge.net/projects/cdemu/rss?path=/image-analyzer" | pcre2grep -o1 'image-analyzer-([0-9.]+)\.tar\.xz' | head -n 1)" + + update-source-version image-analyzer "$newVersion" + ''; + }; + + meta = { + description = "Suite of tools for emulating optical drives and discs"; + longDescription = '' + CDEmu consists of: + + - a kernel module implementing a virtual drive-controller + - libmirage which is a software library for interpreting optical disc images + - a daemon which emulates the functionality of an optical drive+disc + - textmode and GTK clients for controlling the emulator + - an image analyzer to view the structure of image files + + Optical media emulated by CDemu can be mounted within Linux. Automounting is also allowed. + ''; + homepage = "https://cdemu.sourceforge.io/"; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ bendlas ]; + }; +}) diff --git a/pkgs/by-name/li/libmirage/package.nix b/pkgs/by-name/li/libmirage/package.nix new file mode 100644 index 000000000000..f45a1342ab26 --- /dev/null +++ b/pkgs/by-name/li/libmirage/package.nix @@ -0,0 +1,82 @@ +{ + stdenv, + cmake, + pkg-config, + gobject-introspection, + vala, + glib, + libsndfile, + zlib, + bzip2, + xz, + libsamplerate, + intltool, + pcre, + util-linux, + libselinux, + libsepol, + fetchurl, + lib, + writeScript, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "libmirage"; + version = "3.3.1"; + + src = fetchurl { + url = "mirror://sourceforge/cdemu/libmirage-${finalAttrs.version}.tar.xz"; + hash = "sha256-mstOGdmKJXRUrQA5F1DZGqVuY+f25Q5ZpdOXPx4MZRI="; + }; + + env = { + PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0"; + PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; + }; + + buildInputs = [ + glib + libsndfile + zlib + bzip2 + xz + libsamplerate + ]; + + nativeBuildInputs = [ + cmake + pkg-config + intltool + gobject-introspection + vala + ]; + + propagatedBuildInputs = [ + pcre + util-linux + libselinux + libsepol + ]; + + passthru = { + updateScript = writeScript "update-libmirage" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre2 common-updater-scripts + + set -eu -o pipefail + + # Fetch the latest version from the SourceForge RSS feed for libmirage + newVersion="$(curl -s "https://sourceforge.net/projects/cdemu/rss?path=/libmirage" | pcre2grep -o1 'libmirage-([0-9.]+)\.tar\.xz' | head -n 1)" + + update-source-version libmirage "$newVersion" + ''; + }; + + meta = { + maintainers = with lib.maintainers; [ bendlas ]; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + description = "CD-ROM image access library"; + homepage = "https://cdemu.sourceforge.io/about/libmirage/"; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30674f248999..50c6c1d6a792 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1253,21 +1253,11 @@ with pkgs; else throw "Don't know 32-bit platform for cross from: ${stdenv.hostPlatform.stdenv}"; - cdemu-client = callPackage ../applications/emulators/cdemu/client.nix { }; - - cdemu-daemon = callPackage ../applications/emulators/cdemu/daemon.nix { }; - fceux-qt5 = fceux.override { ___qtVersion = "5"; }; fceux-qt6 = fceux.override { ___qtVersion = "6"; }; - gcdemu = callPackage ../applications/emulators/cdemu/gui.nix { }; - - image-analyzer = callPackage ../applications/emulators/cdemu/analyzer.nix { }; - kega-fusion = pkgsi686Linux.callPackage ../applications/emulators/kega-fusion { }; - libmirage = callPackage ../applications/emulators/cdemu/libmirage.nix { }; - mame-tools = lib.addMetaAttrs { description = mame.meta.description + " (tools only)"; } (lib.getOutput "tools" mame); diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 1c674c91fda0..8e5a62bfae8a 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -555,7 +555,7 @@ in veikk-linux-driver = callPackage ../os-specific/linux/veikk-linux-driver { }; vendor-reset = callPackage ../os-specific/linux/vendor-reset { }; - vhba = callPackage ../applications/emulators/cdemu/vhba.nix { }; + vhba = callPackage ../by-name/cd/cdemu-daemon/vhba.nix { }; virtio_vmmci = callPackage ../os-specific/linux/virtio_vmmci { };