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

27 lines
511 B
Nix

{ stdenv
, lib
, xcodeenv
, dark-mode-notify-src
, ...
}:
let
sdkVersion = "13.4.1";
xcode = xcodeenv.composeXcodeWrapper {
version = sdkVersion;
xcodeBaseDir = "/Applications/Xcode.app";
};
in
stdenv.mkDerivation {
name = "dark-mode-notify";
src = dark-mode-notify-src;
buildPhase = ''
${xcode}/bin/xcrun swiftc dark-mode-notify.swift -o dark-mode-notify
'';
installPhase = ''
mkdir -p $out/bin
cp dark-mode-notify $out/bin
'';
meta.platforms = lib.platforms.darwin;
}