nixpkgs/pkgs/applications/audio/easyaudiosync/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

101 lines
2.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
cmake,
qtbase,
qttools,
spdlog,
ffmpeg,
taglib,
wrapQtAppsHook,
makeDesktopItem,
copyDesktopItems,
}:
stdenv.mkDerivation rec {
pname = "easyaudiosync";
version = "1.1.2";
src = fetchFromGitHub {
owner = "complexlogic";
repo = "EasyAudioSync";
rev = "v${version}";
hash = "sha256-UCOL4DzynKjNDvS0HZ4/K+Wn5lOqHZ0bNop0zqJl5kc=";
};
patches = [
./0001-fix-project-name.patch
./0003-fix-darwin-app.patch
./0004-force-qt6.patch
];
nativeBuildInputs = [
cmake
pkg-config
wrapQtAppsHook
] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems;
buildInputs = [
qtbase
qttools
ffmpeg
spdlog
taglib
];
installPhase =
''
runHook preInstall
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv "easyaudiosync.app" "Easy Audio Sync.app"
cp -r "Easy Audio Sync.app" $out/Applications
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
install -Dm755 easyaudiosync $out/bin/easyaudiosync
for RES in 48 64 128 256; do
install -Dm755 "$src/assets/icons/easyaudiosync''${RES}.png" "$out/share/icons/hicolor/''${RES}x''${RES}/apps/easyaudiosync.png"
done
install -Dm755 "$src/assets/icons/easyaudiosync.svg" "$out/share/icons/hicolor/scalable/apps/easyaudiosync.svg"
''
+ ''
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "easyaudiosync";
exec = "easyaudiosync";
icon = "easyaudiosync";
desktopName = "Easy Audio Sync";
categories = [
"Qt"
"Audio"
"AudioVideo"
];
comment = "Audio library syncing and conversion utility";
})
];
meta = with lib; {
description = "Audio library syncing and conversion utility";
longDescription = ''
Easy Audio Sync is an audio library syncing and conversion utility.
The intended use is syncing an audio library with many lossless files to a mobile device
with limited storage.
The program's design is inspired by the rsync utility. It supports folder-based
source to destination syncing, with added audio transcoding capability, and is
GUI-based instead of CLI-based.
'';
homepage = "https://github.com/complexlogic/EasyAudioSync";
license = licenses.unlicense;
maintainers = with maintainers; [ matteopacini ];
platforms = platforms.linux ++ platforms.darwin;
};
}