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

27 lines
505 B
Nix
Raw Normal View History

{ stdenv
, lib
, xcodeenv
, dark-mode-notify-src
2022-12-20 02:45:46 +00:00
, sdkVersion
, ...
}:
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
'';
installPhase = ''
mkdir -p $out/bin
2022-08-31 04:48:48 +00:00
cp .build/release/dark-mode-notify $out/bin
'';
meta.platforms = lib.platforms.darwin;
}