2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2020-08-20 17:08:02 +00:00
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, vala
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, pantheon
|
|
|
|
, python3
|
|
|
|
, substituteAll
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, dosfstools
|
|
|
|
, e2fsprogs
|
|
|
|
, exfat
|
|
|
|
, hfsprogs
|
|
|
|
, ntfs3g
|
|
|
|
, libgee
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "formatter";
|
2021-07-24 12:14:16 +00:00
|
|
|
version = "0.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Djaler";
|
|
|
|
repo = "Formatter";
|
|
|
|
rev = version;
|
2021-07-24 12:14:16 +00:00
|
|
|
sha256 = "sha256-8lZ0jUwHuc3Kntz73Btj6dJvkW2bvShu2KWTSQszbJo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
ext4 = "${e2fsprogs}/bin/mkfs.ext4";
|
|
|
|
exfat = "${exfat}/bin/mkfs.exfat";
|
|
|
|
fat = "${dosfstools}/bin/mkfs.fat";
|
|
|
|
ntfs = "${ntfs3g}/bin/mkfs.ntfs";
|
|
|
|
hfsplus = "${hfsprogs}/bin/mkfs.hfsplus";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
vala
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
libgee
|
|
|
|
pantheon.granite
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson/post_install.py
|
|
|
|
patchShebangs meson/post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A simple formatter designed for elementary OS";
|
|
|
|
homepage = "https://github.com/Djaler/Formatter";
|
2021-09-22 15:38:15 +00:00
|
|
|
maintainers = with maintainers; [ xiorcale ] ++ teams.pantheon.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.lgpl2Plus;
|
2021-12-06 16:07:01 +00:00
|
|
|
mainProgram = "com.github.djaler.formatter";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|