3
0
Fork 0
forked from mirrors/nixpkgs

treewide: more manual fixups for

treewide: move NIX_CFLAGS_COMPILE to the env attrset

`nix-eval-jobs --flake ".#legacyPackages.x86_64-linux" --workers 3 2>/dev/null --impure | jq 'select(.error?) | select(.error | match ("attribute set can only contain derivation") )'`
and
`nix-eval-jobs --flake ".#legacyPackages.aarch64-darwin" --workers 3 2>/dev/null --impure | jq 'select(.error?) | select(.error | match ("attribute set can only contain derivation") )'`

no longer has output so this could be all of the remaining issues
This commit is contained in:
Artturin 2023-02-24 05:44:18 +02:00
parent 6600a103c9
commit d06382a73b
5 changed files with 7 additions and 12 deletions

View file

@ -49,11 +49,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-amedKK9nplLVJTldeabN3/c+g/QesrdH+qx+rba2/4s=";
};
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang [
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (toString [
"-Wno-old-style-cast"
"-Wno-error"
"-D__BIG_ENDIAN__=${if stdenv.isBigEndian then "1" else "0"}"
];
]);
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-rpath ${libargon2}/lib";

View file

@ -30,13 +30,13 @@ stdenv.mkDerivation rec {
makeFlags = [ "kerf" "kerf_test" ];
# avoid a huge amount of warnings to make failures clearer
env.NIX_CFLAGS_COMPILE = map (x: "-Wno-${x}") [
env.NIX_CFLAGS_COMPILE = toString (map (x: "-Wno-${x}") [
"void-pointer-to-int-cast"
"format"
"implicit-function-declaration"
"gnu-variable-sized-type-not-at-end"
"unused-result"
] ++ lib.optionals stdenv.isDarwin [ "-fcommon" ];
] ++ lib.optionals stdenv.isDarwin [ "-fcommon" ]);
patchPhase = ''
substituteInPlace ./Makefile \

View file

@ -23,10 +23,7 @@ stdenv.mkDerivation rec {
buildInputs = [ fftwSinglePrec libsamplerate qtbase ]
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration;
env.NIX_CFLAGS_COMPILE =
lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [
"-std=c++11"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") "-std=c++11";
dontWrapQtApps = true;

View file

@ -12,7 +12,7 @@ let param =
rev = version;
sha256 = "sha256-69Svno0qLaUifMscnVuPUJlCo9d8Lee+1qiYx34G3Po=";
};
env.NIX_CFLAGS_COMPILE = null;
env = { };
buildInputs = [ camlp-streams ];
} else if check "3.12" then {
version = "2.18.5";

View file

@ -26,9 +26,7 @@ buildPythonPackage rec {
];
# Work around Python distutils compiling C++ with $CC (see issue #26709)
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin [
"-I${lib.getDev libcxx}/include/c++/v1"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
pythonImportsCheck = [
"pyexiv2"