push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
file,
zip,
wxGTK32,
gtk3,
contribPlugins ? false,
hunspell,
boost,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
name = "${pname}-${lib.optionalString contribPlugins "full-"}${version}";
pname = "codeblocks";
version = "25.03";
src = fetchurl {
url = "mirror://sourceforge/codeblocks/Sources/${version}/codeblocks_${version}.tar.xz";
hash = "sha256-sPaqWQjTNtf0H5V2skGKx9J++8WSgqqMkXHYjOp0BJ4=";
};
nativeBuildInputs = [
pkg-config
file
zip
wrapGAppsHook3
];
buildInputs = [
wxGTK32
gtk3
]
++ lib.optionals contribPlugins [
hunspell
boost
];
enableParallelBuilding = true;
patches = [ ./writable-projects.patch ];
preConfigure = "substituteInPlace ./configure --replace-fail /bin/file ${file}/bin/file";
postConfigure = lib.optionalString stdenv.hostPlatform.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
configureFlags = [
"--enable-pch=no"
]
++ lib.optionals contribPlugins [
(
"--with-contrib-plugins=all,-FileManager"
+ lib.optionalString stdenv.hostPlatform.isDarwin ",-NassiShneiderman"
)
"--with-boost-libdir=${boost}/lib"
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
ln -s $out/lib/codeblocks/plugins $out/share/codeblocks/plugins
'';
meta = {
maintainers = [ lib.maintainers.linquize ];
platforms = lib.platforms.all;
description = "Open source, cross platform, free C, C++ and Fortran IDE";
longDescription = ''
Code::Blocks is a free C, C++ and Fortran IDE built to meet the most demanding needs of its users.
It is designed to be very extensible and fully configurable.
Finally, an IDE with all the features you need, having a consistent look, feel and operation across platforms.
'';
homepage = "http://www.codeblocks.org";
license = lib.licenses.gpl3;
};
}

View File

@@ -0,0 +1,18 @@
diff --git a/src/plugins/scriptedwizard/wiz.cpp b/src/plugins/scriptedwizard/wiz.cpp
index 0eb4b27..7d469fe 100644
--- a/src/plugins/scriptedwizard/wiz.cpp
+++ b/src/plugins/scriptedwizard/wiz.cpp
@@ -785,6 +785,13 @@ void Wiz::CopyFiles(cbProject* theproject, const wxString& prjdir, const wxStri
}
}
if (do_copy) wxCopyFile(srcfile, dstfile, true);
+ // Noticed! Files in Nix Store are readonly, so make the copied file writable
+ if (do_copy)
+ {
+ struct stat statbuf;
+ if (!::stat(dstfile.mb_str(), &statbuf))
+ ::chmod(dstfile.mb_str(), statbuf.st_mode | 0200);
+ }
// and add it to the project
fname.MakeRelativeTo(prjdir);