2023-08-10 07:59:29 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, cargo
|
|
|
|
, desktop-file-utils
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, rustc
|
|
|
|
, wrapGAppsHook4
|
|
|
|
, cairo
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
|
|
|
, pango
|
2023-11-16 04:20:00 +00:00
|
|
|
, gettext
|
2023-08-10 07:59:29 +00:00
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "diebahn";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.7.0";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "schmiddi-on-mobile";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "railway";
|
2023-08-10 07:59:29 +00:00
|
|
|
rev = version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ps55DiAsetmdcItZKcfyYDD0q0w1Tkf/U48UR/zQx1g=";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
name = "${pname}-${src}";
|
|
|
|
inherit src;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-StJxWasUMj9kh9rLs4LFI3XaZ1Z5pvFBjEjtp79WZjg=";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cargo
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustc
|
|
|
|
wrapGAppsHook4
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk4
|
|
|
|
libadwaita
|
|
|
|
pango
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
2023-11-16 04:20:00 +00:00
|
|
|
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.
|
2024-09-26 11:04:55 +00:00
|
|
|
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
2023-11-16 04:20:00 +00:00
|
|
|
GETTEXT_BIN_DIR = "${lib.getBin gettext}/bin";
|
|
|
|
GETTEXT_INCLUDE_DIR = "${lib.getDev gettext}/include";
|
|
|
|
GETTEXT_LIB_DIR = "${lib.getLib gettext}/lib";
|
|
|
|
};
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
meta = {
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://gitlab.com/schmiddi-on-mobile/railway/-/blob/${src.rev}/CHANGELOG.md";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Travel with all your train information in one place. Also known as Railway";
|
2024-02-29 20:09:43 +00:00
|
|
|
homepage = "https://gitlab.com/schmiddi-on-mobile/railway";
|
2023-08-10 07:59:29 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "diebahn";
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with lib.maintainers; [ dotlambda lilacious ];
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
}
|