nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 autoreconfHook,
7 pkg-config,
8 libiconv,
9 libvorbis,
10 libmad,
11 libao,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 pname = "cdrdao";
16 version = "1.2.6";
17
18 src = fetchFromGitHub {
19 owner = "cdrdao";
20 repo = "cdrdao";
21 tag = "rel_${lib.replaceString "." "_" finalAttrs.version}";
22 hash = "sha256-XEaJsv3c/xPO6jclJBbTopOnYamIOlumD2B+hJZraEE=";
23 };
24
25 makeFlags = [
26 "RM=rm"
27 "LN=ln"
28 "MV=mv"
29 ];
30
31 nativeBuildInputs = [
32 autoreconfHook
33 pkg-config
34 ];
35
36 buildInputs = [
37 libiconv
38 libvorbis
39 libmad
40 libao
41 ];
42
43 hardeningDisable = [ "format" ];
44
45 # we have glibc/include/linux as a symlink to the kernel headers,
46 # and the magic '..' points to kernelheaders, and not back to the glibc/include
47 postPatch = ''
48 sed -i 's,linux/../,,g' dao/sg_err.h
49 '';
50
51 # Needed on gcc >= 6.
52 env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
53
54 meta = {
55 description = "Tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
56 homepage = "https://github.com/cdrdao/cdrdao";
57 platforms = lib.platforms.unix;
58 license = lib.licenses.gpl2Plus;
59 };
60})