nixpkgs/pkgs/by-name/di/diebahn/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
1.9 KiB
Nix
Raw Normal View History

2023-08-07 18:35:36 +00:00
{
lib,
stdenv,
fetchFromGitLab,
cargo,
desktop-file-utils,
meson,
ninja,
pkg-config,
rustPlatform,
rustc,
wrapGAppsHook4,
cairo,
gdk-pixbuf,
glib,
gtk4,
libadwaita,
pango,
gettext,
2023-08-07 18:35:36 +00:00
darwin,
blueprint-compiler,
2023-08-07 18:35:36 +00:00
}:
stdenv.mkDerivation rec {
pname = "diebahn";
version = "2.7.1";
2023-08-07 18:35:36 +00:00
src = fetchFromGitLab {
owner = "schmiddi-on-mobile";
repo = "railway";
2023-08-07 18:35:36 +00:00
rev = version;
hash = "sha256-SLZJiCkHUS2p7cNk3i3yO2c3tWR4T4ch+zJ1iYEkS6E=";
2023-08-07 18:35:36 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
name = "${pname}-${src}";
inherit src;
hash = "sha256-XYlRm8yqQr9ZNV7jQeuR8kvqFNudUjJlzE6h9X0zq0Y=";
2023-08-07 18:35:36 +00:00
};
nativeBuildInputs = [
cargo
desktop-file-utils
meson
ninja
pkg-config
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook4
blueprint-compiler
2023-08-07 18:35:36 +00:00
];
buildInputs =
[
cairo
gdk-pixbuf
glib
gtk4
libadwaita
pango
]
++ lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
CoreFoundation
Foundation
Security
]
);
# Darwin needs to link against gettext from nixpkgs instead of the one vendored by gettext-sys
# because the vendored copy does not build with newer versions of clang.
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
GETTEXT_BIN_DIR = "${lib.getBin gettext}/bin";
GETTEXT_INCLUDE_DIR = "${lib.getDev gettext}/include";
GETTEXT_LIB_DIR = "${lib.getLib gettext}/lib";
};
2023-08-07 18:35:36 +00:00
meta = {
changelog = "https://gitlab.com/schmiddi-on-mobile/railway/-/blob/${src.rev}/CHANGELOG.md";
2024-05-05 09:25:54 +00:00
description = "Travel with all your train information in one place. Also known as Railway";
homepage = "https://gitlab.com/schmiddi-on-mobile/railway";
2023-08-07 18:35:36 +00:00
license = lib.licenses.gpl3Plus;
2023-11-27 17:20:52 +00:00
mainProgram = "diebahn";
maintainers = with lib.maintainers; [
dotlambda
lilacious
];
2023-08-07 18:35:36 +00:00
};
}