mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
84 lines
1.6 KiB
Nix
84 lines
1.6 KiB
Nix
{ lib
|
|
, python3
|
|
, fetchFromGitHub
|
|
, appstream-glib
|
|
, desktop-file-utils
|
|
, gettext
|
|
, gobject-introspection
|
|
, gtk3
|
|
, gtk4
|
|
, libadwaita
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, wrapGAppsHook4
|
|
, nix-update-script
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "portfolio";
|
|
version = "1.0.1";
|
|
|
|
format = "other";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tchx84";
|
|
repo = "Portfolio";
|
|
rev = "v${version}";
|
|
hash = "sha256-IbzAkHlD6duXkPJRSyD9HJ/JHP8+IR7vIGFp2ESbBug=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs build-aux/meson
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
appstream-glib
|
|
desktop-file-utils
|
|
gettext
|
|
gobject-introspection
|
|
gtk3 # For gtk-update-icon-cache
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
wrapGAppsHook4
|
|
];
|
|
|
|
buildInputs = [
|
|
gtk4
|
|
libadwaita
|
|
];
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
pygobject3
|
|
];
|
|
|
|
checkPhase = ''
|
|
meson test
|
|
'';
|
|
|
|
postInstall = ''
|
|
ln -s dev.tchx84.Portfolio "$out/bin/portfolio"
|
|
'';
|
|
|
|
# Prevent double wrapping
|
|
dontWrapGApps = true;
|
|
preFixup = ''
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "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;
|
|
mainProgram = "dev.tchx84.Portfolio";
|
|
maintainers = with maintainers; [ dotlambda chuangzhu ];
|
|
};
|
|
}
|