-
-
Save reckenrode/fb0ece433e0d04ade0f56a3a532924a3 to your computer and use it in GitHub Desktop.
dark-mode with new Swift in nixpkgs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| fetchFromGitHub, | |
| stdenv, | |
| swift, | |
| xcbuildHook, | |
| }: | |
| stdenv.mkDerivation (finalAttrs: { | |
| pname = "dark-mode"; | |
| version = "3.0.2"; | |
| src = fetchFromGitHub { | |
| owner = "sindresorhus"; | |
| repo = "dark-mode"; | |
| tag = "v${finalAttrs.version}"; | |
| hash = "sha256-vgk26fXrtICYyjxsAomVsgr+iEf3ca3U+KRyXF0HxTM="; | |
| }; | |
| postPatch = '' | |
| substituteInPlace dark-mode.xcodeproj/project.pbxproj \ | |
| --replace-fail 'MACOSX_DEPLOYMENT_TARGET = 10.10' 'MACOSX_DEPLOYMENT_TARGET = ${stdenv.hostPlatform.darwinMinVersion}' | |
| ''; | |
| strictDeps = true; | |
| nativeBuildInputs = [ | |
| swift | |
| xcbuildHook | |
| ]; | |
| installPhase = '' | |
| runHook preInstall | |
| install -D -m755 -t "$out/bin" Products/Release/dark-mode | |
| runHook postInstall | |
| ''; | |
| env.NIX_CFLAGS_LINK = "-L/usr/lib/swift -lswiftCore"; | |
| __structuredAttrs = true; | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment