2022-01-25 03:21:06 +00:00
|
|
|
{ pname, version, pkgSha256 }:
|
2022-09-09 14:08:57 +00:00
|
|
|
attrs@{ lib, stdenv, fetchurl, cmake, pkg-config, buildInputs, drvParams ? {}, ... }:
|
2022-01-25 03:21:06 +00:00
|
|
|
stdenv.mkDerivation ( rec {
|
|
|
|
inherit pname version buildInputs;
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2022-01-25 03:21:06 +00:00
|
|
|
url = "mirror://sourceforge/cdemu/${pname}-${version}.tar.xz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = pkgSha256;
|
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [ pkg-config cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
setSourceRoot = ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
sourceRoot="`pwd`"
|
|
|
|
'';
|
|
|
|
configurePhase = ''
|
2022-01-25 03:21:06 +00:00
|
|
|
cmake ../${pname}-${version} -DCMAKE_INSTALL_PREFIX=$out -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A 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.
|
|
|
|
'';
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://cdemu.sourceforge.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2021-01-17 00:15:33 +00:00
|
|
|
maintainers = with lib.maintainers; [ bendlas ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
} // drvParams)
|