mirror of
https://github.com/NixOS/nix
synced 2025-06-24 13:51:16 +02:00
58 lines
998 B
Nix
58 lines
998 B
Nix
{
|
|
lib,
|
|
mkMesonLibrary,
|
|
|
|
nix-util-c,
|
|
nix-store,
|
|
nix-store-c,
|
|
nix-main,
|
|
|
|
# Configuration Options
|
|
|
|
version,
|
|
}:
|
|
|
|
let
|
|
inherit (lib) fileset;
|
|
in
|
|
|
|
mkMesonLibrary (finalAttrs: {
|
|
pname = "nix-main-c";
|
|
inherit version;
|
|
|
|
workDir = ./.;
|
|
fileset = fileset.unions [
|
|
../../nix-meson-build-support
|
|
./nix-meson-build-support
|
|
../../.version
|
|
./.version
|
|
./meson.build
|
|
# ./meson.options
|
|
(fileset.fileFilter (file: file.hasExt "cc") ./.)
|
|
(fileset.fileFilter (file: file.hasExt "hh") ./.)
|
|
(fileset.fileFilter (file: file.hasExt "h") ./.)
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
nix-util-c
|
|
nix-store
|
|
nix-store-c
|
|
nix-main
|
|
];
|
|
|
|
preConfigure =
|
|
# "Inline" .version so it's not a symlink, and includes the suffix.
|
|
# Do the meson utils, without modification.
|
|
''
|
|
chmod u+w ./.version
|
|
echo ${version} > ../../.version
|
|
'';
|
|
|
|
mesonFlags = [
|
|
];
|
|
|
|
meta = {
|
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
|
};
|
|
|
|
})
|