18 inherit (lib) optionals;
20 stdenv.mkDerivation rec {
21 pname = "bucklespring";
24 src = fetchFromGitHub {
28 sha256 = "0prhqibivxzmz90k79zpwx3c97h8wa61rk5ihi9a5651mnc46mna";
31 nativeBuildInputs = [ pkg-config makeWrapper ];
33 buildInputs = [ openal alure ]
34 ++ optionals (legacy) [ libXtst libX11 ]
35 ++ optionals (!legacy) [ libinput ];
37 makeFlags = optionals (!legacy) [ "libinput=1" ];
42 mkdir -p $out/share/wav
43 cp -r $src/wav $out/share/.
44 install -D ./buckle.desktop $out/share/applications/buckle.desktop
45 install -D ./buckle $out/bin/buckle
46 wrapProgram $out/bin/buckle --add-flags "-p $out/share/wav"
52 description = "Nostalgia bucklespring keyboard sound";
53 mainProgram = "buckle";
55 When built with libinput (wayland or bare console),
56 users need to be in the input group to use this:
57 <code>users.users.alice.extraGroups = [ "input" ];</code>
59 homepage = "https://github.com/zevv/bucklespring";
60 license = licenses.gpl2Only;
61 platforms = platforms.unix;
62 maintainers = [ maintainers.evils ];