From 768fc24f2b8253d330b4257d9bc90fa00a52f5bb Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 24 Dec 2023 21:20:12 +0300 Subject: [PATCH] clean up flake --- README.md | 3 +++ flake.nix | 11 ++++------- main.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b5d2445 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# 🚨 mdlinkt + +A CLI tool for detecting dead or inaccessible links in markdown files. diff --git a/flake.nix b/flake.nix index 1a3352a..3a8891f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,6 @@ { description = "mdlinkt: detect broken links in markdown files"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs"; - }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; outputs = { self, @@ -12,15 +10,14 @@ forEachSystem = nixpkgs.lib.genAttrs systems; pkgsForEach = nixpkgs.legacyPackages; - in rec { + in { packages = forEachSystem (system: { - default = pkgsForEach.${system}.callPackage ./nix/package.nix {}; + default = self.packages.${system}.mdlinkt; + mdlinkt = pkgsForEach.${system}.callPackage ./nix/package.nix {}; }); devShells = forEachSystem (system: { default = pkgsForEach.${system}.callPackage ./nix/shell.nix {}; }); - - hydraJobs = packages; }; } diff --git a/main.go b/main.go index 023477c..85656ce 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,7 @@ type LinkCheckResult struct { } func logWithColor(level string, msg string, args ...interface{}) { - timestamp := time.Now().Format("2006/01/02 15:04:05") + timestamp := time.Now().Format("2006/01/02 15:04:05") // TODO: use time.RFC3339? colorFunc := color.New(color.FgWhite).SprintFunc() switch level { case "ERROR":