~andir/nixpkgs-dev

datefmt: init at 0.2 v1 PROPOSED

William Casarin: 1
 datefmt: init at 0.2

 2 files changed, 24 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~andir/nixpkgs-dev/patches/27125/mbox | git am -3
Learn more about email & git

[PATCH] datefmt: init at 0.2 Export this patch

datefmt is a simple C program that formats unix timestamps in text streams

Signed-off-by: William Casarin <jb55@jb55.com>
---

Hey guys,

It seems this place is kinda dead but I figured I would share this util
I wrote and have been using a lot. It's a small C program that formats
unix timestamps over stdin.

I'm gonna go ahead and submit this to nixpkgs myself, but definitely
check it out if you see this!

 pkgs/tools/misc/datefmt/default.nix | 22 ++++++++++++++++++++++
 pkgs/top-level/all-packages.nix     |  2 ++
 2 files changed, 24 insertions(+)
 create mode 100644 pkgs/tools/misc/datefmt/default.nix

diff --git a/pkgs/tools/misc/datefmt/default.nix b/pkgs/tools/misc/datefmt/default.nix
new file mode 100644
index 00000000000..405be1a4278
--- /dev/null
+++ b/pkgs/tools/misc/datefmt/default.nix
@@ -0,0 +1,22 @@
{ lib, stdenv, fetchurl }:

stdenv.mkDerivation rec {
  pname = "datefmt";
  version = "0.2";

  src = fetchurl {
    url = "http://cdn.jb55.com/tarballs/${pname}/${pname}-${version}.tar.gz";
    sha256 = "3dab9cf8e58915d0880cb9f69856be041941f21009d0572644064b200606d65f";
  };

  makeFlags = [ "PREFIX=$(out)" ];

  meta = {
    homepage = "https://jb55.com/datefmt";
    description = "format timestamps in text streams";
    platforms = lib.platforms.all;
    license = lib.licenses.gpl3;
    maintainers = [ lib.maintainers.jb55 ];
  };
}

diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 297236b8f8e..878c581ff92 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2678,6 +2678,8 @@ with pkgs;

  howard-hinnant-date = callPackage ../development/libraries/howard-hinnant-date { };

  datefmt = callPackage ../tools/misc/datefmt { };

  datefudge = callPackage ../tools/system/datefudge { };

  dateutils = callPackage ../tools/misc/dateutils { };
-- 
2.32.0
Reviewed-by: Matthias Beyer <mail@beyermatthias.de>