Merge pull request #251828 from Artturin/gccfixes1

gcc: move dll to output
This commit is contained in:
Artturi 2023-08-29 00:03:38 +03:00 committed by GitHub
commit a90822c192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View File

@ -219,6 +219,7 @@ originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // {
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.la" "''${!outputLib}"
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.dylib" "''${!outputLib}"
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.dll.a" "''${!outputLib}"
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.dll" "''${!outputLib}"
moveToOutput "share/gcc-*/python" "''${!outputLib}"
if [ -z "$enableShared" ]; then
@ -233,6 +234,7 @@ originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // {
moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.so*" "''${!outputLib}"
moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.la" "''${!outputLib}"
moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.dylib" "''${!outputLib}"
moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.dll" "''${!outputLib}"
for i in "''${!outputLib}/''${targetConfig}"/lib64/*.{la,py}; do
substituteInPlace "$i" --replace "$out" "''${!outputLib}"

View File

@ -6,6 +6,8 @@ lib.makeScope newScope (self: with self; {
cygwinSetup = callPackage ./cygwin-setup { };
dlfcn = callPackage ./dlfcn { };
jom = callPackage ./jom { };
w32api = callPackage ./w32api { };

View File

@ -0,0 +1,23 @@
{ stdenv, lib, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "dlfcn";
version = "1.3.1";
src = fetchFromGitHub {
owner = "dlfcn-win32";
repo = "dlfcn-win32";
rev = "v${version}";
sha256 = "sha256-ljVTMBiGp8TPufrQcK4zQtcVH1To4zcfBAbUOb+v910=";
};
nativeBuildInputs = [ cmake ];
meta = with lib; {
homepage = "https://github.com/dlfcn-win32/dlfcn-win32";
description = "Set of functions that allows runtime dynamic library loading";
license = licenses.mit;
platforms = platforms.windows;
maintainers = with maintainers; [ marius851000 ];
};
}