
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
67 lines
1.5 KiB
Nix
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";
|
|
rev = 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;
|
|
};
|
|
}
|