1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-22 08:51:08 +01:00
nix/src/libmain/package.nix
2025-01-15 20:01:00 +01:00

51 lines
852 B
Nix

{ lib
, mkMesonLibrary
, openssl
, nix-util
, nix-store
# Configuration Options
, version
}:
let
inherit (lib) fileset;
in
mkMesonLibrary (finalAttrs: {
pname = "nix-main";
inherit version;
workDir = ./.;
fileset = fileset.unions [
../../nix-meson-build-support
./nix-meson-build-support
../../.version
./.version
./meson.build
(fileset.fileFilter (file: file.hasExt "cc") ./.)
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
propagatedBuildInputs = [
nix-util
nix-store
openssl
];
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
'';
meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
})