Skip to content

Commit

Permalink
spotlight-downloader: init at 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesZh committed Nov 24, 2024
1 parent 924dd67 commit 4d6da31
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkgs/by-name/sp/spotlight-downloader/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
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";
rev = "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;
};
}

0 comments on commit 4d6da31

Please sign in to comment.