2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2023-10-09 19:29:22 +00:00
|
|
|
, makeWrapper
|
|
|
|
, alsa-utils
|
2022-12-17 10:02:37 +00:00
|
|
|
, alsa-lib
|
|
|
|
, gtk4
|
2024-04-21 15:54:59 +00:00
|
|
|
, openssl
|
2022-12-17 10:02:37 +00:00
|
|
|
, wrapGAppsHook4
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "alsa-scarlett-gui";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.4.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "geoffreybennett";
|
|
|
|
repo = pname;
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-+74JRQn2xwgPHZSrp5b+uny0+aLnsFvx/cOKIdj4J40=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
makeFlags = [ "DESTDIR=\${out}" "PREFIX=''" ];
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config wrapGAppsHook4 makeWrapper ];
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs = [ gtk4 alsa-lib openssl ];
|
2023-08-04 22:07:22 +00:00
|
|
|
postInstall = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
wrapProgram $out/bin/alsa-scarlett-gui --prefix PATH : ${lib.makeBinPath [ alsa-utils ]}
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
substituteInPlace $out/share/applications/vu.b4.alsa-scarlett-gui.desktop \
|
|
|
|
--replace "Exec=/bin/alsa-scarlett-gui" "Exec=$out/bin/alsa-scarlett-gui"
|
2023-08-04 22:07:22 +00:00
|
|
|
'';
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# causes redefinition of _FORTIFY_SOURCE
|
|
|
|
hardeningDisable = [ "fortify3" ];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "GUI for alsa controls presented by Focusrite Scarlett Gen 2/3/4 Mixer Driver";
|
|
|
|
mainProgram = "alsa-scarlett-gui";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://github.com/geoffreybennett/alsa-scarlett-gui";
|
|
|
|
license = licenses.gpl3Plus;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ mdorman ];
|
2022-12-17 10:02:37 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|