nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 appstream,
4 desktop-file-utils,
5 fetchFromGitHub,
6 glib,
7 gobject-introspection,
8 gtk4,
9 libadwaita,
10 meson,
11 ninja,
12 nix-update-script,
13 pkg-config,
14 python3Packages,
15 wrapGAppsHook4,
16 ffmpeg-headless,
17}:
18
19python3Packages.buildPythonApplication rec {
20 pname = "drum-machine";
21 version = "1.5.0";
22 pyproject = false;
23
24 src = fetchFromGitHub {
25 owner = "Revisto";
26 repo = "drum-machine";
27 tag = "v${version}";
28 hash = "sha256-F3h3BxLNkJq0jpfNOGcTbckpc8CksyA3Bc8GNKviB+I=";
29 };
30
31 strictDeps = true;
32
33 nativeBuildInputs = [
34 appstream
35 desktop-file-utils
36 glib
37 gobject-introspection
38 gtk4 # For `gtk-update-icon-theme`
39 meson
40 ninja
41 pkg-config
42 wrapGAppsHook4
43 ];
44
45 buildInputs = [ libadwaita ];
46
47 dependencies = with python3Packages; [
48 mido
49 pygame
50 pygobject3
51 numpy
52 ];
53
54 dontWrapGApps = true;
55
56 makeWrapperArgs = [
57 "\${gappsWrapperArgs[@]}"
58 "--prefix PATH : ${lib.makeBinPath [ ffmpeg-headless ]}"
59 ];
60
61 # NOTE: `postCheck` is intentionally not used here, as the entire checkPhase
62 # is skipped by `buildPythonApplication`
63 # https://github.com/NixOS/nixpkgs/blob/9d4343b7b27a3e6f08fc22ead568233ff24bbbde/pkgs/development/interpreters/python/mk-python-derivation.nix#L296
64 postInstallCheck = ''
65 mesonCheckPhase
66 '';
67
68 passthru = {
69 updateScript = nix-update-script { };
70 };
71
72 meta = {
73 description = "Modern and intuitive application for creating, playing, and managing drum patterns";
74 homepage = "https://apps.gnome.org/DrumMachine";
75 changelog = "https://github.com/Revisto/drum-machine/releases/tag/${src.tag}";
76 license = lib.licenses.gpl3Plus;
77 teams = [ lib.teams.gnome-circle ];
78 platforms = lib.platforms.linux;
79 };
80}