about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2023-10-28 12:35:52 +0200
committerGitHub <noreply@github.com>2023-10-28 12:35:52 +0200
commitf36961c0bd7f879bb3b1075b037f212a3a210e85 (patch)
tree0af30dc9d8f6426619d4fb4cc84e4a4fef608b0b /pkgs/by-name
parent2fd6af1929acc4cd2e0da827f016dd988eb66e5f (diff)
parentfc1031b2d32c0301ce8a941c5646672c0d7dfdf0 (diff)
downloadnixlib-f36961c0bd7f879bb3b1075b037f212a3a210e85.tar
nixlib-f36961c0bd7f879bb3b1075b037f212a3a210e85.tar.gz
nixlib-f36961c0bd7f879bb3b1075b037f212a3a210e85.tar.bz2
nixlib-f36961c0bd7f879bb3b1075b037f212a3a210e85.tar.lz
nixlib-f36961c0bd7f879bb3b1075b037f212a3a210e85.tar.xz
nixlib-f36961c0bd7f879bb3b1075b037f212a3a210e85.tar.zst
nixlib-f36961c0bd7f879bb3b1075b037f212a3a210e85.zip
Merge pull request #261683 from srid/nix-health
nix-health: init at 0.2.3
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/ni/nix-health/package.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/by-name/ni/nix-health/package.nix b/pkgs/by-name/ni/nix-health/package.nix
new file mode 100644
index 000000000000..5a5179cfcd0a
--- /dev/null
+++ b/pkgs/by-name/ni/nix-health/package.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv
+, rustPlatform
+, fetchCrate
+, libiconv
+, openssl
+, pkg-config
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "nix-health";
+  version = "0.2.3";
+
+  src = fetchCrate {
+    inherit version;
+    pname = "nix_health";
+    hash = "sha256-WdzzEFk9VPld6AFTNRsaQbMymw1+mNn/TViGO/Qv0so=";
+  };
+
+  cargoHash = "sha256-xmuosy9T/52D90uXMQAIxtaYDOlCekNCtzpu/3GyQXE=";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libiconv openssl ]
+    # Use a newer SDK for CoreFoundation, because the sysinfo crate requires
+    # it, https://github.com/GuillaumeGomez/sysinfo/issues/915
+    ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks;
+      [ IOKit
+        CoreFoundation
+      ]);
+
+  meta = with lib; {
+    description = "Check the health of your Nix setup";
+    homepage = "https://zero-to-flakes.com/health/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ srid ];
+    mainProgram = "nix-health";
+  };
+}