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

27 lines
516 B
Nix

{ stdenv
, lib
, xcodeenv
, dark-mode-notify-src
, sdkVersion ? "13.4.1"
, ...
}:
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;
}