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