mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
libutil/package.nix: Remove .version symlink replacement solution
This commit is contained in:
parent
e084316130
commit
7dd938b228
1 changed files with 15 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, mkMesonDerivation
|
||||||
, releaseTools
|
, releaseTools
|
||||||
|
|
||||||
, meson
|
, meson
|
||||||
|
@ -38,22 +39,22 @@ let
|
||||||
else stdenv.mkDerivation;
|
else stdenv.mkDerivation;
|
||||||
in
|
in
|
||||||
|
|
||||||
mkDerivation (finalAttrs: {
|
mkMesonDerivation (finalAttrs: {
|
||||||
pname = "nix-util";
|
pname = "nix-util";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = fileset.toSource {
|
workDir = ./.;
|
||||||
root = ./.;
|
fileset = fileset.unions [
|
||||||
fileset = fileset.unions [
|
../../.version
|
||||||
./meson.build
|
./.version
|
||||||
./meson.options
|
./meson.build
|
||||||
./linux/meson.build
|
./meson.options
|
||||||
./unix/meson.build
|
./linux/meson.build
|
||||||
./windows/meson.build
|
./unix/meson.build
|
||||||
(fileset.fileFilter (file: file.hasExt "cc") ./.)
|
./windows/meson.build
|
||||||
(fileset.fileFilter (file: file.hasExt "hh") ./.)
|
(fileset.fileFilter (file: file.hasExt "cc") ./.)
|
||||||
];
|
(fileset.fileFilter (file: file.hasExt "hh") ./.)
|
||||||
};
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
@ -80,13 +81,9 @@ mkDerivation (finalAttrs: {
|
||||||
disallowedReferences = [ boost ];
|
disallowedReferences = [ boost ];
|
||||||
|
|
||||||
preConfigure =
|
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
|
# Copy some boost libraries so we don't get all of Boost in our
|
||||||
# closure. https://github.com/NixOS/nixpkgs/issues/45462
|
# closure. https://github.com/NixOS/nixpkgs/issues/45462
|
||||||
+ lib.optionalString (!stdenv.hostPlatform.isStatic) (''
|
lib.optionalString (!stdenv.hostPlatform.isStatic) (''
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
|
cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
|
||||||
rm -f $out/lib/*.a
|
rm -f $out/lib/*.a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue