licensure: enable darwin builds

Licensure provides provides Mac builds, so they appear to intend to
support Mac users and avoid Linux-specific dependencies that would limit
their ability to run this program cross-platform.
This commit is contained in:
Amelia Keibler 2024-06-21 09:53:32 -04:00
parent ba5a6f19ed
commit 99a01ed596

View File

@ -1,10 +1,12 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, git
, gitls
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "licensure";
@ -19,7 +21,10 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-449p+y7qUcTxBOttyQPt+nRtK+s9HJBoVKGdMQaszLQ=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl git gitls ];
buildInputs = [ openssl git gitls ]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.SystemConfiguration
];
checkFlags = [
# Checking for files in the git repo (git ls-files),
@ -33,6 +38,6 @@ rustPlatform.buildRustPackage rec {
license = licenses.gpl3Plus;
mainProgram = "licensure";
maintainers = [ maintainers.soispha ];
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
};
}