2015-02-10 02:27:04 +01:00
|
|
|
{ pkgName, version, pkgSha256 }:
|
2021-01-17 03:30:45 +01:00
|
|
|
{ lib, stdenv, fetchurl, cmake, pkg-config, buildInputs, drvParams ? {} }:
|
2015-02-10 02:27:04 +01:00
|
|
|
let name = "${pkgName}-${version}";
|
2021-08-30 17:11:01 +02:00
|
|
|
ext = if lib.versionAtLeast version "3.2.5" then ".xz" else ".bz2";
|
2015-02-10 02:27:04 +01:00
|
|
|
in stdenv.mkDerivation ({
|
|
|
|
inherit name buildInputs;
|
|
|
|
src = fetchurl {
|
2021-08-30 17:11:01 +02:00
|
|
|
url = "mirror://sourceforge/cdemu/${name}.tar${ext}";
|
2015-02-10 02:27:04 +01:00
|
|
|
sha256 = pkgSha256;
|
|
|
|
};
|
2021-01-17 03:30:45 +01:00
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
2015-02-10 02:27:04 +01:00
|
|
|
setSourceRoot = ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
sourceRoot="`pwd`"
|
|
|
|
'';
|
|
|
|
configurePhase = ''
|
|
|
|
cmake ../${name} -DCMAKE_INSTALL_PREFIX=$out -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON
|
|
|
|
'';
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-04-30 17:05:14 +02:00
|
|
|
description = "A suite of tools for emulating optical drives and discs";
|
2015-02-10 02:27:04 +01:00
|
|
|
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-08-30 17:11:01 +02:00
|
|
|
homepage = "https://cdemu.sourceforge.io/";
|
2015-04-30 17:05:14 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2021-01-15 14:21:58 +01:00
|
|
|
maintainers = with lib.maintainers; [ bendlas ];
|
2015-02-10 02:27:04 +01:00
|
|
|
};
|
|
|
|
} // drvParams)
|