Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spotlight-downloader: init at 1.5.0 #351095

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions pkgs/by-name/sp/spotlight-downloader/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
lib,
fetchFromGitHub,
stdenv,
msbuild,
mono,
makeWrapper,
}:

let
pname = "spotlight-downloader";
version = "1.5.0";
in
stdenv.mkDerivation {
inherit pname version;

src = fetchFromGitHub {
owner = "ORelio";
repo = "Spotlight-Downloader";
tag = "v${version}";
hash = "sha256-wGblbLBfH/sjUsz+hcg7OOWFavJ0k4piU/ypBEodvpY=";
};

nativeBuildInputs = [
msbuild
makeWrapper
];

buildPhase = ''
runHook preBuild

msbuild /p:Configuration=Release SpotlightDownloader/SpotlightDownloader.csproj

runHook postBuild
'';

installPhase = ''
runHook preInstall

mkdir -p $out/bin $out/share
cp -r SpotlightDownloader/bin/Release $out/share/SpotlightDownloader
makeWrapper ${lib.getExe mono} $out/bin/SpotlightDownloader \
--add-flags "$out/share/SpotlightDownloader/SpotlightDownloader.exe"

runHook postInstall
'';

meta = {
description = "Retrieve Windows Spotlight images from the Microsoft Spotlight API";
license = lib.licenses.cddl;
maintainers = with lib.maintainers; [ ulysseszhan ];
homepage = "https://github.com/ORelio/Spotlight-Downloader";
platforms = lib.platforms.unix;
UlyssesZh marked this conversation as resolved.
Show resolved Hide resolved
mainProgram = "SpotlightDownloader";
};
}
Loading