summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2023-10-01 22:43:58 +0200
committerLinnnus <[email protected]>2023-10-01 23:08:32 +0200
commit7e27f6f2250bd4e0faa5d5e626dce541a8bb22e4 (patch)
tree11eb68ec0ae6e1f9cd1f4d7b645cc55e582b1873 /pkgs
parent241bbaf27ad990d0630b7b48f3e9858e8f42b88f (diff)
Use alejandra formatter
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/default.nix12
-rw-r--r--pkgs/duksebot/default.nix59
-rw-r--r--pkgs/still-awake/default.nix74
-rw-r--r--pkgs/tcl-cmark/default.nix18
-rw-r--r--pkgs/trash/default.nix16
5 files changed, 90 insertions, 89 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix
index c4aced8..9f296c9 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -1,11 +1,9 @@
-pkgs:
+pkgs: {
+ duksebot = pkgs.callPackage ./duksebot {};
-{
- duksebot = pkgs.callPackage ./duksebot { };
+ tcl-cmark = pkgs.callPackage ./tcl-cmark {};
- tcl-cmark = pkgs.callPackage ./tcl-cmark { };
+ still-awake = pkgs.callPackage ./still-awake {};
- still-awake = pkgs.callPackage ./still-awake { };
-
- trash = pkgs.callPackage ./trash { };
+ trash = pkgs.callPackage ./trash {};
}
diff --git a/pkgs/duksebot/default.nix b/pkgs/duksebot/default.nix
index 833bf76..17919b6 100644
--- a/pkgs/duksebot/default.nix
+++ b/pkgs/duksebot/default.nix
@@ -1,34 +1,35 @@
-{ python3
-, fetchFromGitHub
-, writeShellScriptBin
-}:
+{
+ python3,
+ fetchFromGitHub,
+ writeShellScriptBin,
+}: let
+ icalevents = ps:
+ ps.buildPythonPackage rec {
+ pname = "icalevents";
+ version = "0.1.27";
-let
- icalevents = ps: ps.buildPythonPackage rec {
- pname = "icalevents";
- version = "0.1.27";
+ src = fetchFromGitHub {
+ owner = "jazzband";
+ repo = pname;
+ rev = "v${version}";
+ hash = "sha256-vSYQEJFBjXUF4WwEAtkLtcO3y/am00jGS+8Vj+JMMqQ=";
+ };
- src = fetchFromGitHub {
- owner = "jazzband";
- repo = pname;
- rev = "v${version}";
- hash = "sha256-vSYQEJFBjXUF4WwEAtkLtcO3y/am00jGS+8Vj+JMMqQ=";
- };
-
- doCheck = false;
+ doCheck = false;
- propagatedBuildInputs = with ps; [
- httplib2
- datetime
- icalendar
- ];
- };
- python3' = python3.withPackages (ps: with ps; [
- pytz
- requests
- python-dotenv
- (icalevents ps)
- ]);
+ propagatedBuildInputs = with ps; [
+ httplib2
+ datetime
+ icalendar
+ ];
+ };
+ python3' = python3.withPackages (ps:
+ with ps; [
+ pytz
+ requests
+ python-dotenv
+ (icalevents ps)
+ ]);
src = fetchFromGitHub {
owner = "linnnus";
repo = "duksebot";
@@ -36,7 +37,7 @@ let
hash = "sha256-+tbC7Z3oewBTyE6wTpUocL+6oWjCRAsqauBLTIOVBUY=";
};
in
-writeShellScriptBin "duksebot"
+ writeShellScriptBin "duksebot"
''
exec ${python3'}/bin/python3 ${src}/script.py
''
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;
+ };
+ }
diff --git a/pkgs/tcl-cmark/default.nix b/pkgs/tcl-cmark/default.nix
index 4f8a5ce..4495610 100644
--- a/pkgs/tcl-cmark/default.nix
+++ b/pkgs/tcl-cmark/default.nix
@@ -1,11 +1,11 @@
-{ tcl
-, pkg-config
-, autoreconfHook
-, cmark-gfm
-, fetchFromGitHub
-, lib
+{
+ tcl,
+ pkg-config,
+ autoreconfHook,
+ cmark-gfm,
+ fetchFromGitHub,
+ lib,
}:
-
tcl.mkTclDerivation {
pname = "tcl-cmark";
version = "2022-03-15";
@@ -21,8 +21,8 @@ tcl.mkTclDerivation {
./fix-gfm-extension-name.patch
];
- nativeBuildInputs = [ pkg-config autoreconfHook ];
- buildInputs = [ cmark-gfm ];
+ nativeBuildInputs = [pkg-config autoreconfHook];
+ buildInputs = [cmark-gfm];
meta = with lib; {
description = "Tcl bindings to the cmark-gfm Github Flavoured CommonMark/Markdown library";
diff --git a/pkgs/trash/default.nix b/pkgs/trash/default.nix
index 8f7a287..9f7a743 100644
--- a/pkgs/trash/default.nix
+++ b/pkgs/trash/default.nix
@@ -1,10 +1,10 @@
-{ stdenv
-, fetchFromGitHub
-, perl534Packages
-, darwin
-, lib
+{
+ stdenv,
+ fetchFromGitHub,
+ perl534Packages,
+ darwin,
+ lib,
}:
-
stdenv.mkDerivation rec {
name = "trash";
version = "0.9.2";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
rev = "v${version}";
sha256 = "sha256-vibUimY15KTulGVqmmTGtO/+XowoRHykcmL8twdgebQ=";
};
- patches = [ ./trash-dont-hardcode-arch.patch ];
+ patches = [./trash-dont-hardcode-arch.patch];
buildInputs = [
darwin.apple_sdk.frameworks.Cocoa
darwin.apple_sdk.frameworks.AppKit
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
perl534Packages.podlators
];
- outputs = [ "out" "man" ];
+ outputs = ["out" "man"];
buildPhase = ''
make trash trash.1