libutil/package.nix: Remove .version symlink replacement solution

This commit is contained in:
Robert Hensing 2024-06-30 19:42:05 +02:00
parent e084316130
commit 7dd938b228

View file

@ -1,5 +1,6 @@
{ lib
, stdenv
, mkMesonDerivation
, releaseTools
, meson
@ -38,22 +39,22 @@ let
else stdenv.mkDerivation;
in
mkDerivation (finalAttrs: {
mkMesonDerivation (finalAttrs: {
pname = "nix-util";
inherit version;
src = fileset.toSource {
root = ./.;
fileset = fileset.unions [
./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") ./.)
];
};
workDir = ./.;
fileset = fileset.unions [
../../.version
./.version
./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") ./.)
];
outputs = [ "out" "dev" ];
@ -80,13 +81,9 @@ mkDerivation (finalAttrs: {
disallowedReferences = [ boost ];
preConfigure =
# "Inline" .version so it's not a symlink, and includes the suffix
''
echo ${version} > .version
''
# Copy some boost libraries so we don't get all of Boost in our
# closure. https://github.com/NixOS/nixpkgs/issues/45462
+ lib.optionalString (!stdenv.hostPlatform.isStatic) (''
lib.optionalString (!stdenv.hostPlatform.isStatic) (''
mkdir -p $out/lib
cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
rm -f $out/lib/*.a