2022-07-16 20:34:47 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, xcodeenv
|
|
|
|
, dark-mode-notify-src
|
2022-12-20 02:45:46 +00:00
|
|
|
, sdkVersion
|
2022-07-16 20:34:47 +00:00
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
xcode = xcodeenv.composeXcodeWrapper {
|
|
|
|
version = sdkVersion;
|
|
|
|
xcodeBaseDir = "/Applications/Xcode.app";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "dark-mode-notify";
|
|
|
|
src = dark-mode-notify-src;
|
|
|
|
buildPhase = ''
|
2022-08-31 04:48:48 +00:00
|
|
|
${xcode}/bin/xcrun swift build -c release --disable-sandbox
|
2022-07-16 20:34:47 +00:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2022-08-31 04:48:48 +00:00
|
|
|
cp .build/release/dark-mode-notify $out/bin
|
2022-07-16 20:34:47 +00:00
|
|
|
'';
|
|
|
|
meta.platforms = lib.platforms.darwin;
|
|
|
|
}
|
|
|
|
|