Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

67 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
makeWrapper,
alsa-utils,
alsa-lib,
gtk4,
openssl,
wrapGAppsHook4,
}:
stdenv.mkDerivation rec {
pname = "alsa-scarlett-gui";
version = "0.5.1";
src = fetchFromGitHub {
owner = "geoffreybennett";
repo = "alsa-scarlett-gui";
tag = version;
hash = "sha256-DkfpMK0T67B4mnriignf4hx6Ifddls0rN0SxyfEsPZg=";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ];
makeFlags = [
"DESTDIR=\${out}"
"PREFIX=''"
];
sourceRoot = "${src.name}/src";
postPatch = ''
substituteInPlace file.c \
--replace-fail "/usr/sbin/alsactl" "${alsa-utils}/bin/alsactl"
'';
nativeBuildInputs = [
pkg-config
wrapGAppsHook4
makeWrapper
];
buildInputs = [
gtk4
alsa-lib
openssl
];
postInstall = ''
wrapProgram $out/bin/alsa-scarlett-gui --prefix PATH : ${lib.makeBinPath [ alsa-utils ]}
substituteInPlace $out/share/applications/vu.b4.alsa-scarlett-gui.desktop \
--replace-fail "Exec=/bin/alsa-scarlett-gui" "Exec=$out/bin/alsa-scarlett-gui"
'';
# causes redefinition of _FORTIFY_SOURCE
hardeningDisable = [ "fortify3" ];
meta = with lib; {
description = "GUI for alsa controls presented by Focusrite Scarlett Gen 2/3/4 Mixer Driver";
mainProgram = "alsa-scarlett-gui";
homepage = "https://github.com/geoffreybennett/alsa-scarlett-gui";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ mdorman ];
platforms = platforms.linux;
};
}