dotfiles.nix/pkgs/dark-mode-notify.nix

31 lines
575 B
Nix
Raw Permalink Normal View History

2024-07-18 14:16:04 +00:00
{
stdenv,
lib,
xcodeenv,
dark-mode-notify-src,
}:
let
xcode = xcodeenv.composeXcodeWrapper {
2023-10-26 02:37:42 +00:00
version = "*.*";
xcodeBaseDir = "/Applications/Xcode.app";
};
2024-07-18 14:16:04 +00:00
in
stdenv.mkDerivation {
2023-10-26 02:37:42 +00:00
pname = "dark-mode-notify";
version = dark-mode-notify-src.shortRev;
src = dark-mode-notify-src;
2023-10-26 02:37:42 +00:00
buildPhase = ''
2022-08-31 04:48:48 +00:00
${xcode}/bin/xcrun swift build -c release --disable-sandbox
'';
2023-10-26 02:37:42 +00:00
installPhase = ''
mkdir -p $out/bin
2022-08-31 04:48:48 +00:00
cp .build/release/dark-mode-notify $out/bin
'';
2023-10-26 02:37:42 +00:00
meta.platforms = lib.platforms.darwin;
meta.mainProgram = "dark-mode-notify";
}