mirror of
https://github.com/NixOS/nix
synced 2025-07-02 21:51:50 +02:00
https://github.com/NixOS/nixpkgs/issues/86131 is now fixed!
(cherry picked from commit 459fb59493
)
65 lines
1 KiB
Nix
65 lines
1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
mkMesonLibrary,
|
|
|
|
boost,
|
|
brotli,
|
|
libarchive,
|
|
libblake3,
|
|
libcpuid,
|
|
libsodium,
|
|
nlohmann_json,
|
|
openssl,
|
|
|
|
# Configuration Options
|
|
|
|
version,
|
|
}:
|
|
|
|
let
|
|
inherit (lib) fileset;
|
|
in
|
|
|
|
mkMesonLibrary (finalAttrs: {
|
|
pname = "nix-util";
|
|
inherit version;
|
|
|
|
workDir = ./.;
|
|
fileset = fileset.unions [
|
|
../../nix-meson-build-support
|
|
./nix-meson-build-support
|
|
../../.version
|
|
./.version
|
|
./widecharwidth
|
|
./meson.build
|
|
./meson.options
|
|
./linux/meson.build
|
|
./unix/meson.build
|
|
./windows/meson.build
|
|
(fileset.fileFilter (file: file.hasExt "cc") ./.)
|
|
(fileset.fileFilter (file: file.hasExt "hh") ./.)
|
|
];
|
|
|
|
buildInputs = [
|
|
brotli
|
|
libblake3
|
|
libsodium
|
|
openssl
|
|
] ++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid;
|
|
|
|
propagatedBuildInputs = [
|
|
boost
|
|
libarchive
|
|
nlohmann_json
|
|
];
|
|
|
|
mesonFlags = [
|
|
(lib.mesonEnable "cpuid" stdenv.hostPlatform.isx86_64)
|
|
];
|
|
|
|
meta = {
|
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
|
};
|
|
|
|
})
|