nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 48 lines 1.5 kB view raw
1{ 2 lib, 3 fetchurl, 4 appimageTools, 5 nix-update-script, 6 makeWrapper, 7}: 8appimageTools.wrapType2 rec { 9 pname = "dopamine"; 10 version = "3.0.2"; 11 12 src = fetchurl { 13 url = "https://github.com/digimezzo/dopamine/releases/download/v${version}/Dopamine-${version}.AppImage"; 14 hash = "sha256-Cb3Kwqf4PQW+bQonsPdACzp7gpVTm0DpR8wOcQ1qZFE="; 15 }; 16 17 nativeBuildInputs = [ makeWrapper ]; 18 19 extraInstallCommands = 20 let 21 contents = appimageTools.extract { inherit pname version src; }; 22 in 23 '' 24 wrapProgram $out/bin/${pname} \ 25 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" 26 27 install -Dm644 ${contents}/dopamine.desktop $out/share/applications/dopamine.desktop 28 substituteInPlace $out/share/applications/dopamine.desktop \ 29 --replace-fail 'Exec=AppRun' 'Exec=dopamine' 30 cp -r ${contents}/usr/share/icons $out/share 31 ''; 32 33 passthru.updateScript = nix-update-script { extraArgs = [ "--version=unstable" ]; }; 34 35 meta = { 36 changelog = "https://github.com/digimezzo/dopamine/blob/${version}/CHANGELOG.md"; 37 description = "Audio player that keeps it simple"; 38 homepage = "https://github.com/digimezzo/dopamine"; 39 license = lib.licenses.gpl3Only; 40 mainProgram = "dopamine"; 41 maintainers = with lib.maintainers; [ 42 Guanran928 43 ern775 44 ]; 45 platforms = [ "x86_64-linux" ]; 46 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 47 }; 48}