From bb621257d20430ccdbba5cf69aec56ea9d46ff30 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Sun, 1 Mar 2026 17:15:51 -0700 Subject: [PATCH] freebsd.bsdfan: init --- pkgs/os-specific/bsd/freebsd/pkgs/bsdfan.nix | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/os-specific/bsd/freebsd/pkgs/bsdfan.nix diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/bsdfan.nix b/pkgs/os-specific/bsd/freebsd/pkgs/bsdfan.nix new file mode 100644 index 000000000000..985638f0f40e --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/bsdfan.nix @@ -0,0 +1,39 @@ +{ + lib, + fetchFromGitHub, + fetchpatch, + mkDerivation, +}: +mkDerivation { + path = "..."; + pname = "bsdfan"; + version = "devel-2018"; + src = fetchFromGitHub { + owner = "claudiozz"; + repo = "bsdfan"; + rev = "d8428a773ec4e0dd465b145fa701097e2f93d7cc"; + hash = "sha256-y4CYDJLXVn5+eZ+5akEYQvzv+Shv7He4fYOyaQAbNyQ="; + }; + outputs = [ + "out" + "debug" + ]; + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/ca7665183b5ede6266650081b4fadfb5afa6561c/sysutils/bsdfan/files/patch-system.c"; + extraPrefix = ""; + hash = "sha256-VPO1S6KUuPOUhJ0U+MvI1Ksaa9t9aXtzrKgqfWtcHzo="; + }) + ]; + + postInstall = '' + mkdir -p $out/etc + cp bsdfan.conf $out/etc + ''; + + meta = { + description = "A simple FreeBSD fan control utility for thinkpads"; + platforms = lib.platforms.freebsd; + mainProgram = "bsdfan"; + }; +}