about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/samplebrain/default.nix
blob: 942e7bccc13c926af84e1adef96686e082647d79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ lib
, stdenv
, fetchFromGitLab
, fftw
, liblo
, libsndfile
, makeDesktopItem
, portaudio
, qmake
, qtbase
, wrapQtAppsHook
}:

stdenv.mkDerivation rec {
  pname = "samplebrain";
  version = "0.18.5";

  src = fetchFromGitLab {
    owner = "then-try-this";
    repo = "samplebrain";
    rev = "v${version}_release";
    hash = "sha256-/pMHmwly5Dar7w/ZawvR3cWQHw385GQv/Wsl1E2w5p4=";
  };

  nativeBuildInputs = [
    qmake
    wrapQtAppsHook
  ];

  buildInputs = [
    fftw
    liblo
    libsndfile
    portaudio
    qtbase
  ];

  desktopItem = makeDesktopItem {
    type = "Application";
    desktopName = pname;
    name = pname;
    comment = "A sample masher designed by Aphex Twin";
    exec = pname;
    icon = pname;
    categories = [ "Audio" ];
  };

  installPhase = ''
    mkdir -p $out/bin
    cp samplebrain $out/bin
    install -m 444 -D desktop/samplebrain.svg $out/share/icons/hicolor/scalable/apps/samplebrain.svg
  '';

  meta = with lib; {
    description = "A custom sample mashing app";
    homepage = "https://thentrythis.org/projects/samplebrain";
    changelog = "https://gitlab.com/then-try-this/samplebrain/-/releases/v${version}_release";
    maintainers = with maintainers; [ mitchmindtree ];
    license = licenses.gpl2;
    platforms = platforms.linux;
  };
}