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

20 lines
500 B
Nix

{ stdenv, lib, xcodeenv, dark-mode-notify-src, sdkVersion, ... }:
let
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 swift build -c release --disable-sandbox
'';
installPhase = ''
mkdir -p $out/bin
cp .build/release/dark-mode-notify $out/bin
'';
meta.platforms = lib.platforms.darwin;
}