summaryrefslogtreecommitdiff
path: root/pkgs/still-awake
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/still-awake')
-rw-r--r--pkgs/still-awake/default.nix74
1 files changed, 38 insertions, 36 deletions
diff --git a/pkgs/still-awake/default.nix b/pkgs/still-awake/default.nix
index 9285346..4bcd3ca 100644
--- a/pkgs/still-awake/default.nix
+++ b/pkgs/still-awake/default.nix
@@ -1,39 +1,41 @@
-{ stdenv, pypy3, lib }:
-
-let
+{
+ stdenv,
+ pypy3,
+ lib,
+}: let
# Needs python interpreter with tkinter support.
python3' = pypy3;
in
-stdenv.mkDerivation {
- pname = "still-awake";
- version = "10-09-2023";
-
- src = builtins.readFile ./still_awake.py;
- passAsFile = [ "buildCommand" "src" ];
-
- # Building basically boils down to writing source to a file
- # and making it executable.
- buildCommand = ''
- mkdir -p $out/bin
-
- echo "#!${python3'.interpreter}" >$out/bin/still-awake
-
- if [ -e "$srcPath" ]; then
- cat "$srcPath" >>$out/bin/still-awake
- else
- echo -n "$src" >>$out/bin/still-awake
- fi
-
- chmod +x $out/bin/still-awake
- '';
-
- # It doesn't make sense to do this remotely.
- preferLocalBuild = true;
- allowSubstitute = false;
-
- meta = with lib; {
- description = "Small program which shuts down Mac, if user is asleep";
- license = licenses.unlicense;
- platforms = platforms.darwin;
- };
-}
+ stdenv.mkDerivation {
+ pname = "still-awake";
+ version = "10-09-2023";
+
+ src = builtins.readFile ./still_awake.py;
+ passAsFile = ["buildCommand" "src"];
+
+ # Building basically boils down to writing source to a file
+ # and making it executable.
+ buildCommand = ''
+ mkdir -p $out/bin
+
+ echo "#!${python3'.interpreter}" >$out/bin/still-awake
+
+ if [ -e "$srcPath" ]; then
+ cat "$srcPath" >>$out/bin/still-awake
+ else
+ echo -n "$src" >>$out/bin/still-awake
+ fi
+
+ chmod +x $out/bin/still-awake
+ '';
+
+ # It doesn't make sense to do this remotely.
+ preferLocalBuild = true;
+ allowSubstitute = false;
+
+ meta = with lib; {
+ description = "Small program which shuts down Mac, if user is asleep";
+ license = licenses.unlicense;
+ platforms = platforms.darwin;
+ };
+ }