Unverified Commit 59c5d168 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

audacity: 3.6.4 -> 3.7.0 (#352518)

parents 1593b76b 8c416bc8
Loading
Loading
Loading
Loading
+7 −14
Original line number Diff line number Diff line
@@ -52,9 +52,9 @@
  wavpack,
  wxGTK32,
  gtk3,
  apple-sdk_11,
  libpng,
  libjpeg,
  darwin,
}:

# TODO
@@ -62,30 +62,24 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "audacity";
  version = "3.6.4";
  version = "3.7.0";

  src = fetchFromGitHub {
    owner = "audacity";
    repo = "audacity";
    rev = "Audacity-${finalAttrs.version}";
    hash = "sha256-72k79UFxhk8JUCnMzbU9lZ0Ua3Ui41EkhPGSnGkf9mE=";
    hash = "sha256-jwsn/L9e1ViWLOh8Xc4lTS9FhanD4GK0BllCwtPamZc=";
  };

  postPatch =
    ''
      mkdir src/private
      substituteInPlace scripts/build/macOS/fix_bundle.py \
        --replace "path.startswith('/usr/lib/')" "path.startswith('${builtins.storeDir}')"
        --replace-fail "path.startswith('/usr/lib/')" "path.startswith('${builtins.storeDir}')"
    ''
    + lib.optionalString stdenv.hostPlatform.isLinux ''
      substituteInPlace libraries/lib-files/FileNames.cpp \
        --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
    ''
    +
      lib.optionalString
        (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0")
        ''
          sed -z -i "s/NSAppearanceName.*systemAppearance//" src/AudacityApp.mm
        --replace-fail /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
    '';

  nativeBuildInputs =
@@ -150,8 +144,7 @@ stdenv.mkDerivation (finalAttrs: {
      util-linux
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      darwin.apple_sdk.frameworks.AppKit
      darwin.apple_sdk.frameworks.CoreAudioKit # for portaudio
      apple-sdk_11
      libpng
      libjpeg
    ];