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

25 lines
566 B
Nix
Raw Normal View History

2023-10-26 02:37:42 +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";
};
2023-08-23 00:50:29 +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";
}