25 lines
566 B
Nix
25 lines
566 B
Nix
{ stdenv, lib, xcodeenv, dark-mode-notify-src }:
|
|
let
|
|
xcode = xcodeenv.composeXcodeWrapper {
|
|
version = "*.*";
|
|
xcodeBaseDir = "/Applications/Xcode.app";
|
|
};
|
|
in stdenv.mkDerivation {
|
|
pname = "dark-mode-notify";
|
|
version = dark-mode-notify-src.shortRev;
|
|
|
|
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;
|
|
meta.mainProgram = "dark-mode-notify";
|
|
}
|