2021-03-23 19:22:30 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, appstream-glib
|
|
|
|
, desktop-file-utils
|
|
|
|
, gettext
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
2023-10-09 19:29:22 +00:00
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
2021-03-23 19:22:30 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2023-10-09 19:29:22 +00:00
|
|
|
, wrapGAppsHook4
|
2023-03-27 19:17:25 +00:00
|
|
|
, nix-update-script
|
2021-03-23 19:22:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "portfolio";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.0.1";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tchx84";
|
|
|
|
repo = "Portfolio";
|
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-IbzAkHlD6duXkPJRSyD9HJ/JHP8+IR7vIGFp2ESbBug=";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build-aux/meson
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
appstream-glib
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
2023-10-09 19:29:22 +00:00
|
|
|
gtk3 # For gtk-update-icon-cache
|
2021-03-23 19:22:30 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
2023-10-09 19:29:22 +00:00
|
|
|
wrapGAppsHook4
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pygobject3
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
checkPhase = ''
|
|
|
|
meson test
|
|
|
|
'';
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
postInstall = ''
|
|
|
|
ln -s dev.tchx84.Portfolio "$out/bin/portfolio"
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# Prevent double wrapping
|
|
|
|
dontWrapGApps = true;
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
passthru = {
|
2023-08-04 22:07:22 +00:00
|
|
|
updateScript = nix-update-script { };
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A minimalist file manager for those who want to use Linux mobile devices";
|
|
|
|
homepage = "https://github.com/tchx84/Portfolio";
|
|
|
|
changelog = "https://github.com/tchx84/Portfolio/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "dev.tchx84.Portfolio";
|
2023-03-27 19:17:25 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda chuangzhu ];
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
}
|