mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 03:43:45 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
55 lines
1.4 KiB
Nix
55 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, makeWrapper
|
|
, alsa-utils
|
|
, alsa-lib
|
|
, gtk4
|
|
, openssl
|
|
, wrapGAppsHook4
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "alsa-scarlett-gui";
|
|
version = "0.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "geoffreybennett";
|
|
repo = "alsa-scarlett-gui";
|
|
rev = version;
|
|
hash = "sha256-+74JRQn2xwgPHZSrp5b+uny0+aLnsFvx/cOKIdj4J40=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|