2024-01-25 14:12:00 +00:00
|
|
|
{ lib
|
|
|
|
, blueprint-compiler
|
|
|
|
, cargo
|
2024-04-21 15:54:59 +00:00
|
|
|
, darwin
|
2024-01-25 14:12:00 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, fetchFromGitHub
|
|
|
|
, glib
|
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, rustc
|
|
|
|
, stdenv
|
|
|
|
, wrapGAppsHook4
|
|
|
|
}:
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-01-25 14:12:00 +00:00
|
|
|
pname = "fretboard";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "6.1";
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bragefuglseth";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "fretboard";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-Jr7DxoOmggcAxU1y+2jXZvMgAf9SDSA7t5Jr2AYZV7s=";
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
2024-05-15 15:35:15 +00:00
|
|
|
src = finalAttrs.src;
|
|
|
|
name = "${finalAttrs.pname}-${finalAttrs.version}";
|
|
|
|
hash = "sha256-P7dafWBaHVrxh30YxKiraKPMjtmGTTNd8qvoJ1M2vKI=";
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
blueprint-compiler
|
|
|
|
cargo
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustc
|
|
|
|
wrapGAppsHook4
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk4
|
|
|
|
libadwaita
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Foundation
|
2024-01-25 14:12:00 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
|
|
|
|
"-Wno-error=incompatible-function-pointer-types"
|
|
|
|
]);
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
meta = with lib; {
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/bragefuglseth/fretboard/releases/tag/v${finalAttrs.version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
description = "Look up guitar chords";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://apps.gnome.org/Fretboard/";
|
2024-01-25 14:12:00 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
mainProgram = "fretboard";
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ michaelgrahamevans ];
|
2024-04-21 15:54:59 +00:00
|
|
|
platforms = platforms.unix;
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
})
|