tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
chuck: cleanup
Matthew Bauer
7 years ago
ee92ab07
030760a9
+15
-17
1 changed file
expand all
collapse all
unified
split
pkgs
applications
audio
chuck
default.nix
+15
-17
pkgs/applications/audio/chuck/default.nix
···
1
1
-
{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which
1
1
+
{ stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which
2
2
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
3
3
+
, xcbuild
3
4
}:
4
5
5
6
stdenv.mkDerivation rec {
···
11
12
sha256 = "02z7sglax3j09grj5s1skmw8z6wz7b21hjrm95nrrdpwbxabh079";
12
13
};
13
14
14
14
-
buildInputs = [ bison flex libsndfile which ]
15
15
-
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib
16
16
-
++ stdenv.lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
15
15
+
nativeBuildInputs = [ flex bison which ];
16
16
+
17
17
+
buildInputs = [ libsndfile ]
18
18
+
++ lib.optional (!stdenv.isDarwin) alsaLib
19
19
+
++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
17
20
18
21
patches = [ ./clang.patch ./darwin-limits.patch ];
19
22
20
20
-
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot";
21
21
-
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework MultitouchSupport";
23
23
+
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-missing-sysroot";
24
24
+
NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework MultitouchSupport";
22
25
23
26
postPatch = ''
24
27
substituteInPlace src/makefile --replace "/usr/bin" "$out/bin"
25
25
-
substituteInPlace src/makefile.osx --replace "xcodebuild" "/usr/bin/xcodebuild"
26
26
-
substituteInPlace src/makefile.osx --replace "weak_framework" "framework"
27
27
-
substituteInPlace src/makefile.osx --replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
28
28
-
'';
29
29
-
30
30
-
buildPhase = ''
31
31
-
make -C src ${if stdenv.isDarwin then "osx" else "linux-alsa"}
28
28
+
substituteInPlace src/makefile.osx \
29
29
+
--replace "weak_framework" "framework" \
30
30
+
--replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
32
31
'';
33
32
34
34
-
installPhase = ''
35
35
-
install -Dm755 ./src/chuck $out/bin/chuck
36
36
-
'';
33
33
+
makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ];
34
34
+
buildFlags = [ (if stdenv.isDarwin then "osx" else "linux-alsa") ];
37
35
38
38
-
meta = with stdenv.lib; {
36
36
+
meta = with lib; {
39
37
description = "Programming language for real-time sound synthesis and music creation";
40
38
homepage = http://chuck.cs.princeton.edu;
41
39
license = licenses.gpl2;