27 lines
510 B
Nix
27 lines
510 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 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;
|
|
}
|
|
|