Skip to content

Commit

Permalink
Merge pull request NixOS#12261 from NixOS/packaging
Browse files Browse the repository at this point in the history
Packaging cleanups, add RossComputerGuy as `-llvm` maintainer
  • Loading branch information
Ericson2314 authored Jan 15, 2025
2 parents e02026a + 7ad02b6 commit 0c10167
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 90 deletions.
6 changes: 6 additions & 0 deletions packaging/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ let
];
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
env = prevAttrs.env or {}
// lib.optionalAttrs
(stdenv.isLinux
&& !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")
&& !(stdenv.hostPlatform.useLLVM or false))
{ LDFLAGS = "-fuse-ld=gold"; };
};

mesonLibraryLayer = finalAttrs: prevAttrs:
Expand Down
4 changes: 0 additions & 4 deletions src/libcmd/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ mkMesonLibrary (finalAttrs: {
(lib.mesonOption "readline-flavor" readlineFlavor)
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM or false)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libexpr-c/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-store-c
Expand Down Expand Up @@ -47,10 +46,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libexpr-test-support/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-store-test-support
Expand Down Expand Up @@ -51,10 +50,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
4 changes: 0 additions & 4 deletions src/libexpr-tests/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ mkMesonExecutable (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

passthru = {
tests = {
run = runCommand "${finalAttrs.pname}-run" {
Expand Down
2 changes: 0 additions & 2 deletions src/libexpr/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ mkMesonLibrary (finalAttrs: {
# https://github.com/NixOS/nixpkgs/issues/86131.
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
} // lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM or false)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
Expand Down
4 changes: 0 additions & 4 deletions src/libfetchers-tests/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ mkMesonExecutable (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

passthru = {
tests = {
run = runCommand "${finalAttrs.pname}-run" {
Expand Down
5 changes: 0 additions & 5 deletions src/libfetchers/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-util
Expand Down Expand Up @@ -49,10 +48,6 @@ mkMesonLibrary (finalAttrs: {
echo ${version} > ../../.version
'';

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM or false)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libflake-c/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-store-c
Expand Down Expand Up @@ -49,10 +48,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
4 changes: 0 additions & 4 deletions src/libflake-tests/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ mkMesonExecutable (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

passthru = {
tests = {
run = runCommand "${finalAttrs.pname}-run" {
Expand Down
5 changes: 0 additions & 5 deletions src/libflake/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-util
Expand Down Expand Up @@ -48,10 +47,6 @@ mkMesonLibrary (finalAttrs: {
echo ${version} > ../../.version
'';

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM or false)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libmain-c/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-util-c
Expand Down Expand Up @@ -51,10 +50,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libmain/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, openssl
Expand Down Expand Up @@ -45,10 +44,6 @@ mkMesonLibrary (finalAttrs: {
echo ${version} > ../../.version
'';

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM or false)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libstore-c/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-util-c
Expand Down Expand Up @@ -47,10 +46,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libstore-test-support/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-util-test-support
Expand Down Expand Up @@ -51,10 +50,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
4 changes: 0 additions & 4 deletions src/libstore-tests/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ mkMesonExecutable (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

passthru = {
tests = {
run = let
Expand Down
2 changes: 0 additions & 2 deletions src/libstore/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ mkMesonLibrary (finalAttrs: {
# https://github.com/NixOS/nixpkgs/issues/86131.
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
} // lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM or false)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
Expand Down
5 changes: 0 additions & 5 deletions src/libutil-c/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-util
Expand Down Expand Up @@ -45,10 +44,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
5 changes: 0 additions & 5 deletions src/libutil-test-support/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonLibrary

, nix-util
Expand Down Expand Up @@ -49,10 +48,6 @@ mkMesonLibrary (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down
4 changes: 0 additions & 4 deletions src/libutil-tests/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ mkMesonExecutable (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
LDFLAGS = "-fuse-ld=gold";
};

passthru = {
tests = {
run = runCommand "${finalAttrs.pname}-run" {
Expand Down
2 changes: 0 additions & 2 deletions src/libutil/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ mkMesonLibrary (finalAttrs: {
# https://github.com/NixOS/nixpkgs/issues/86131.
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
} // lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM or false)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
Expand Down
5 changes: 0 additions & 5 deletions src/nix/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
, mkMesonExecutable

, nix-store
Expand Down Expand Up @@ -99,10 +98,6 @@ mkMesonExecutable (finalAttrs: {
mesonFlags = [
];

env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") && !(stdenv.hostPlatform.useLLVM)) {
LDFLAGS = "-fuse-ld=gold";
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
Expand Down

0 comments on commit 0c10167

Please sign in to comment.