-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add packages.twenty-twenty-twenty-static to flake.nix
- Loading branch information
1 parent
1dd295f
commit 98d72ff
Showing
2 changed files
with
47 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ lib | ||
, stdenv | ||
, alsa-lib | ||
, buildGoModule | ||
, darwin | ||
, pkg-config | ||
, extraLdflags ? [ ] | ||
, version ? "unknown" | ||
}: | ||
|
||
buildGoModule { | ||
pname = "twenty-twenty-twenty"; | ||
inherit version; | ||
src = ./.; | ||
vendorHash = "sha256-3RtdnS4J7JbdU+jMTEzClSlDDPh6bWqbjchvrtS8HUc"; | ||
|
||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ | ||
pkg-config | ||
]; | ||
|
||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ | ||
alsa-lib | ||
] ++ | ||
lib.optionals stdenv.hostPlatform.isDarwin [ | ||
darwin.apple_sdk_11_0.frameworks.MetalKit | ||
darwin.apple_sdk_11_0.frameworks.UserNotifications | ||
]; | ||
|
||
# Tests are mostly useful for development, not to ensure that | ||
# program is running correctly. | ||
doCheck = false; | ||
|
||
ldflags = [ "-X=main.version=${version}" ] ++ extraLdflags; | ||
|
||
meta = with lib; { | ||
description = "Alerts every 20 minutes to look something at 20 feet away for 20 seconds"; | ||
homepage = "https://github.com/thiagokokada/twenty-twenty-twenty"; | ||
license = licenses.mit; | ||
mainProgram = "twenty-twenty-twenty"; | ||
}; | ||
} |