nixpkgs/pkgs/applications/backup/pika-backup/default.nix
Alyssa Ross 5e06b3cb19 treewide: don't use rustPlatform.rust
This will be deprecated in the next commit.
2023-05-12 15:31:21 +00:00

80 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchFromGitLab
, rustPlatform
, substituteAll
, cargo
, desktop-file-utils
, git
, itstool
, meson
, ninja
, pkg-config
, python3
, rustc
, wrapGAppsHook4
, borgbackup
, gtk4
, libadwaita
, libsecret
}:
stdenv.mkDerivation rec {
pname = "pika-backup";
version = "0.6.1";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "pika-backup";
rev = "v${version}";
hash = "sha256-7sgAp9/CKKxPr8rWbOot+FPAwaC8EPLa9pjVcC4TjW8=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-Va7qLC6WvsLmG9JVmdT1FdIlWP4W/EFmsy7JOagQ+X8=";
};
patches = [
(substituteAll {
src = ./borg-path.patch;
borg = "${borgbackup}/bin/borg";
})
];
postPatch = ''
patchShebangs build-aux
'';
nativeBuildInputs = [
desktop-file-utils
git
itstool
meson
ninja
pkg-config
python3
wrapGAppsHook4
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = [
gtk4
libadwaita
libsecret
];
meta = with lib; {
description = "Simple backups based on borg";
homepage = "https://apps.gnome.org/app/org.gnome.World.PikaBackup";
changelog = "https://gitlab.gnome.org/World/pika-backup/-/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.linux;
};
}