mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
packages/hrt-time: init
This commit is contained in:
parent
70e7b70875
commit
8e7cfef3f2
2 changed files with 41 additions and 0 deletions
11
nix/packages/by-name/hrt-time/my-day.patch
Normal file
11
nix/packages/by-name/hrt-time/my-day.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
diff --git a/hrt-time.sh b/hrt-time.sh
|
||||||
|
index d9811dd..f37aa6f 100755
|
||||||
|
--- a/hrt-time.sh
|
||||||
|
+++ b/hrt-time.sh
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
secondsNow=$(date +%s)
|
||||||
|
-secondsThen=$(date -d "october 17 2024 19:00" +%s)
|
||||||
|
+secondsThen=$(date -d "november 12 2021" +%s)
|
||||||
|
seconds=$((secondsNow - secondsThen))
|
||||||
30
nix/packages/by-name/hrt-time/package.nix
Normal file
30
nix/packages/by-name/hrt-time/package.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
fetchFromGitHub,
|
||||||
|
stdenvNoCC,
|
||||||
|
lib,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
rev = "b344ab770e4c08d0bb13c38ea61979b282e24db7";
|
||||||
|
in
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
pname = "hrt-time";
|
||||||
|
version = "unstable-" + lib.substring 0 8 rev;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ariannelafraise";
|
||||||
|
repo = "hrt-time";
|
||||||
|
inherit rev;
|
||||||
|
hash = "sha256-+AhLkcCETVnF6S+ov1oKxhs3M9F6ghyyERoLN3aMMxw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp hrt-time.sh $out/bin/hrt-time
|
||||||
|
'';
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./my-day.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
meta.mainProgram = "hrt-time";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue