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,87 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
doxygen,
boost,
eigen,
jrl-cmakemodules,
assimp,
octomap,
qhull,
pythonSupport ? false,
python3Packages,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "coal";
version = "3.0.1";
src = fetchFromGitHub {
owner = "coal-library";
repo = "coal";
tag = "v${finalAttrs.version}";
hash = "sha256-2X1chL4tYQXo50W/C5z+IVA1DGPcPdA378lh+7Bs2OE=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
]
++ lib.optionals pythonSupport [
python3Packages.numpy
python3Packages.pythonImportsCheckHook
];
propagatedBuildInputs = [
assimp
jrl-cmakemodules
octomap
qhull
zlib
]
++ lib.optionals (!pythonSupport) [
boost
eigen
]
++ lib.optionals pythonSupport [
python3Packages.boost
python3Packages.eigenpy
];
cmakeFlags = [
(lib.cmakeBool "COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL" true)
(lib.cmakeBool "COAL_HAS_QHULL" true)
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
];
doCheck = true;
pythonImportsCheck = [
"coal"
"hppfcl"
];
outputs = [
"dev"
"out"
"doc"
];
postFixup = ''
moveToOutput share/ament_index "$dev"
moveToOutput share/coal "$dev"
'';
meta = {
description = "Collision Detection Library, previously hpp-fcl";
homepage = "https://github.com/coal-library/coal";
changelog = "https://github.com/coal-library/coal/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ nim65s ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,22 @@
diff --git a/configure.ac b/configure.ac
index 23ba6f0..13e6647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_PREREQ(2.59)
AM_INIT_AUTOMAKE(1.13 no-define)
AC_CHECK_HEADERS(strings.h)
AC_MSG_CHECKING(for big-endian host)
-AC_TRY_RUN([main () {
+AC_TRY_RUN([int main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
@@ -12,7 +12,7 @@ AC_TRY_RUN([main () {
char c[sizeof (long)];
} u;
u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
+ return u.c[sizeof (long) - 1] == 1;
}], BIG_ENDIAN=no, BIG_ENDIAN=yes)
AC_MSG_RESULT([$BIG_ENDIAN])
AM_CONDITIONAL([IS_BIG_ENDIAN],[test "$BIG_ENDIAN" = "yes"])

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
perl,
}:
stdenv.mkDerivation rec {
version = "6.0.1";
pname = "coan";
src = fetchurl {
url = "mirror://sourceforge/project/coan2/v${version}/${pname}-${version}.tar.gz";
sha256 = "1d041j0nd1hc0562lbj269dydjm4rbzagdgzdnmwdxr98544yw44";
};
patches = [
# fix compile error in configure.ac
./fix-big-endian-config-check.diff
];
nativeBuildInputs = [
autoreconfHook
perl
];
configureFlags = [ "CXXFLAGS=-std=c++11" ];
enableParallelBuilding = true;
postInstall = ''
mv -v $out/share/man/man1/coan.1.{1,gz}
'';
meta = with lib; {
description = "C preprocessor chainsaw";
mainProgram = "coan";
longDescription = ''
A software engineering tool for analysing preprocessor-based
configurations of C or C++ source code. Its principal use is to simplify
a body of source code by eliminating any parts that are redundant with
respect to a specified configuration. Dead code removal is an
application of this sort.
'';
homepage = "https://coan2.sourceforge.net/";
license = licenses.bsd3;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cobalt";
version = "0.20.1";
src = fetchFromGitHub {
owner = "cobalt-org";
repo = "cobalt.rs";
tag = "v${finalAttrs.version}";
hash = "sha256-0MwIJJ7oNUFMNqMzew9HgaZsfBNczBli20vsxtIWZq0=";
};
cargoHash = "sha256-4oLEInL5hocCkP20lrOzfwPm5ram8Xw6p1qSva1tzNQ=";
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Static site generator written in Rust";
homepage = "https://cobalt-org.github.io/";
downloadPage = "https://github.com/cobalt-org/cobalt.rs/";
changelog = "https://github.com/cobalt-org/cobalt.rs/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ethancedwards8 ];
platforms = lib.platforms.unix;
mainProgram = "cobalt";
};
})

View File

@@ -0,0 +1,87 @@
{
lib,
python3Packages,
blueprint-compiler,
desktop-file-utils,
fetchFromGitHub,
gst_all_1,
gobject-introspection,
libadwaita,
libportal-gtk4,
meson,
networkmanager,
ninja,
pipewire,
pkg-config,
wrapGAppsHook4,
}:
python3Packages.buildPythonApplication rec {
pname = "cobang";
version = "1.7.1";
pyproject = false; # Built with meson
src = fetchFromGitHub {
owner = "hongquan";
repo = "CoBang";
tag = "v${version}";
hash = "sha256-rBGz9g6+6jguJggBQKlyOWoME3VHOP8Gq4VtYywoVdI=";
};
# https://github.com/hongquan/CoBang/issues/117
postPatch = ''
substituteInPlace src/window.blp \
--replace-fail 'seeing-symbolic' 'scanner-symbolic'
'';
nativeBuildInputs = [
blueprint-compiler
desktop-file-utils
# Needed to recognize gobject namespaces
gobject-introspection
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
gst_all_1.gst-plugins-base
# Requires v4l2src
(gst_all_1.gst-plugins-good.override { gtkSupport = true; })
# gtk4paintablesink
gst_all_1.gst-plugins-rs
libadwaita
libportal-gtk4
networkmanager
pipewire
];
dependencies = with python3Packages; [
logbook
# Needed as a gobject namespace and to fix 'Caps' object is not subscriptable
gst-python
pillow
pygobject3
python-zbar
];
# Wrapping this manually for SVG recognition
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = {
description = "QR code scanner desktop app for Linux";
homepage = "https://github.com/hongquan/CoBang";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
aleksana
dvaerum
];
mainProgram = "cobang";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
makeWrapper,
installShellFiles,
go,
}:
buildGoModule rec {
pname = "cobra-cli";
version = "1.3.0";
src = fetchFromGitHub {
owner = "spf13";
repo = "cobra-cli";
rev = "v${version}";
sha256 = "sha256-E0I/Pxw4biOv7aGVzGlQOFXnxkc+zZaEoX1JmyMh6UE=";
};
vendorHash = "sha256-vrtGPQzY+NImOGaSxV+Dvch+GNPfL9XfY4lfCHTGXwY=";
nativeBuildInputs = [
makeWrapper
installShellFiles
];
allowGoReference = true;
postPatch = ''
substituteInPlace "cmd/add_test.go" \
--replace "TestGoldenAddCmd" "SkipGoldenAddCmd"
substituteInPlace "cmd/init_test.go" \
--replace "TestGoldenInitCmd" "SkipGoldenInitCmd"
'';
postFixup = ''
wrapProgram "$out/bin/cobra-cli" \
--prefix PATH : ${go}/bin
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd cobra-cli \
--bash <($out/bin/cobra-cli completion bash) \
--fish <($out/bin/cobra-cli completion fish) \
--zsh <($out/bin/cobra-cli completion zsh) \
# Ironically, cobra-cli still uses old, slightly buggy completion code
# This will correct the #compdef tag and add separate compdef line
# allowing direct sourcing to also activate the completion
substituteInPlace "$out/share/zsh/site-functions/_cobra-cli" \
--replace-fail '#compdef _cobra-cli cobra-cli' "#compdef cobra-cli''\ncompdef _cobra-cli cobra-cli"
'';
meta = {
description = "Cobra CLI tool to generate applications and commands";
mainProgram = "cobra-cli";
homepage = "https://github.com/spf13/cobra-cli/";
changelog = "https://github.com/spf13/cobra-cli/releases/tag/${version}";
license = lib.licenses.afl20;
maintainers = [ lib.maintainers.ivankovnatsky ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage {
pname = "coc-basedpyright";
# No tagged releases, this version is inferred from <https://www.npmjs.com/package/coc-basedpyright>
version = "1.19.0-unstable-2025-04-30";
src = fetchFromGitHub {
owner = "fannheyward";
repo = "coc-basedpyright";
rev = "7d944083c7d4843b1dfa9e05014873b0b5bbb85b";
hash = "sha256-5Vuw54bSk3WMy8bMsIvtkfDmlx3oocxmD1ykfpErbkc=";
};
npmDepsHash = "sha256-hn+Y1f7o/Oz37XXJUPF2CJbrPzZYOY0njrJv+T3ve6w=";
meta = {
description = "Basedpyright extension for coc.nvim";
homepage = "https://github.com/fannheyward/coc-basedpyright";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ wrvsrx ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage {
pname = "coc-clangd";
version = "0.31.0";
src = fetchFromGitHub {
owner = "clangd";
repo = "coc-clangd";
# Upstream has no tagged versions
rev = "3a85a36f1ac08454deab1ed8d2553e0cae00cc1c";
hash = "sha256-uxK0nciLq4ZKFCoMJrO4dR0tuOBHYpgdZUc/KJ+JA/I=";
};
npmDepsHash = "sha256-93MEug2eEL/Hum+RFmXx0JYO6jUygF8QRmL5nTTFyrs=";
meta = {
description = "clangd extension for coc.nvim";
homepage = "https://github.com/clangd/coc-clangd";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "coc-css";
version = "2.1.0";
src = fetchFromGitHub {
owner = "neoclide";
repo = "coc-css";
rev = finalAttrs.version;
hash = "sha256-ASFg5LM1NbpK+Df1TPs+O13WmZktw+BtfsCJagF5nUc=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-JJXpsccO9MZ0D15JUZtTebX1zUMgwGEzSOm7auw5pQo=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
yarnInstallHook
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Css language server extension for coc.nvim";
homepage = "https://github.com/neoclide/coc-css";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
nodejs,
npmHooks,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coc-diagnostic";
version = "0.24.1";
src = fetchFromGitHub {
owner = "iamcco";
repo = "coc-diagnostic";
# Upstream has no tagged versions
rev = "f4b8774bccf1c031da51f8ee52b05bc6b2337bf9";
hash = "sha256-+RPNFZ3OmdI9v0mY1VNJPMHs740IXvVJy4WYMgqqQSM=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-/WBOZKIIE2ERKuGwG+unXyam2JavPOuUeSIwZQ9RiHY=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
npmHooks.npmInstallHook
];
# ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks
postFixup = ''
unlink $out/lib/node_modules/coc-diagnostic/node_modules/.bin/node-which
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Diagnostic-languageserver extension for coc.nvim";
homepage = "https://github.com/iamcco/coc-diagnostic";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})

View File

@@ -0,0 +1,26 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "coc-docker";
version = "1.0.2";
src = fetchFromGitHub {
owner = "josa42";
repo = "coc-docker";
tag = "v${finalAttrs.version}";
hash = "sha256-orSwQys+w2TKLau0gROyKh54vq7AwlVLsoU1EzALIDQ=";
};
npmDepsHash = "sha256-ow9viEFfyBUM2yDa63+pQCg6R5cAmznanqfI131fRxc=";
meta = {
description = "Docker language server extension using dockerfile-language-server-nodejs for coc.nvim";
homepage = "https://github.com/josa42/coc-docker";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coc-explorer";
version = "0.27.3";
src = fetchFromGitHub {
owner = "weirongxu";
repo = "coc-explorer";
tag = "v${finalAttrs.version}";
hash = "sha256-lIJloatVEKPM36GE/xpVk+cx8Jz89BWU8qsNjc1eoFw=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-w2La2GTJfHjn6qaVQaHsQp8V2KNx2hqDVuBJUYk6WKg=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
yarnInstallHook
nodejs
];
yarnBuildScript = "build:pack";
passthru.updateScript = nix-update-script { };
meta = {
description = "Explorer for coc.nvim";
homepage = "https://github.com/weirongxu/coc-explorer";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})

View File

@@ -0,0 +1,148 @@
diff --git i/package-lock.json w/package-lock.json
index 066c4d9..950dff5 100644
--- i/package-lock.json
+++ w/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "coc-git",
- "version": "2.7.2",
+ "version": "2.7.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coc-git",
- "version": "2.7.2",
+ "version": "2.7.7",
"license": "MIT",
"devDependencies": {
"@chemzqm/tsconfig": "^0.0.3",
@@ -32,6 +32,8 @@
},
"node_modules/@chemzqm/tsconfig": {
"version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/@chemzqm/tsconfig/-/tsconfig-0.0.3.tgz",
+ "integrity": "sha512-MjF25vbqLYR+S+JJLgBi0vn4gZqv/C87H+yPSlVKEqlIJAJOGJOgFPUFvRS7pdRHqkv2flX/oRxzxhlu2V0X1w==",
"dev": true,
"license": "MIT"
},
@@ -462,6 +464,8 @@
},
"node_modules/@types/colors": {
"version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@types/colors/-/colors-1.2.1.tgz",
+ "integrity": "sha512-7jNkpfN2lVO07nJ1RWzyMnNhH/I5N9iWuMPx9pedptxJ4MODf8rRV0lbJi6RakQ4sKQk231Fw4e2W9n3D7gZ3w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -470,6 +474,8 @@
},
"node_modules/@types/colors/node_modules/colors": {
"version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz",
+ "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -478,6 +484,8 @@
},
"node_modules/@types/debounce": {
"version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.0.tgz",
+ "integrity": "sha512-bWG5wapaWgbss9E238T0R6bfo5Fh3OkeoSt245CM7JJwVwpw6MEBCbIxLq5z8KzsE3uJhzcIuQkyiZmzV3M/Dw==",
"dev": true,
"license": "MIT"
},
@@ -490,11 +498,15 @@
},
"node_modules/@types/uuid": {
"version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-7.0.4.tgz",
+ "integrity": "sha512-WGZCqBZZ0mXN2RxvLHL6/7RCu+OWs28jgQMP04LWfpyJlQUMTR6YU9CNJAKDgbw+EV/u687INXuLUc7FuML/4g==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/which": {
"version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@types/which/-/which-1.3.2.tgz",
+ "integrity": "sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA==",
"dev": true,
"license": "MIT"
},
@@ -517,6 +529,8 @@
},
"node_modules/colors": {
"version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
+ "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -525,6 +539,8 @@
},
"node_modules/debounce": {
"version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz",
+ "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==",
"dev": true,
"license": "MIT"
},
@@ -571,6 +587,8 @@
},
"node_modules/iconv-lite": {
"version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz",
+ "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -582,11 +600,15 @@
},
"node_modules/isexe": {
"version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
"license": "ISC"
},
"node_modules/safer-buffer": {
"version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true,
"license": "MIT"
},
@@ -605,11 +627,15 @@
},
"node_modules/timeago.js": {
"version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-4.0.2.tgz",
+ "integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w==",
"dev": true,
"license": "MIT"
},
"node_modules/typescript": {
"version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
+ "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -622,6 +648,8 @@
},
"node_modules/uuid": {
"version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
+ "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
"dev": true,
"license": "MIT",
"bin": {
@@ -630,6 +658,8 @@
},
"node_modules/which": {
"version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"license": "ISC",
"dependencies": {

View File

@@ -0,0 +1,32 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "coc-git";
version = "2.7.7";
src = fetchFromGitHub {
owner = "neoclide";
repo = "coc-git";
tag = finalAttrs.version;
hash = "sha256-5AN5G9u4ZGDrP1dfQal9KpOyMZrVqXnxDslnuMwJ9SU=";
};
patches = [
./fix-package-lock.patch
];
npmDepsHash = "sha256-vkAATI0vs1oeMr0/iQ8YDt3r+aJo6ND/x4mY/TlRwpg=";
npmBuildScript = "prepare";
meta = {
description = "Git integration of coc.nvim";
homepage = "https://github.com/neoclide/coc-git";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage {
pname = "coc-pyright";
version = "1.1.371";
src = fetchFromGitHub {
owner = "fannheyward";
repo = "coc-pyright";
# No tagged releases, this commit corresponds to the latest release of the package.
rev = "d4cfda2f530622962a2a6e3ac1ddb2ad83ea2387";
hash = "sha256-oNixIW63DhPn2LYJ5t/R4xcReZR3W6nqqFBnCUmo/Wo=";
};
npmDepsHash = "sha256-cTAt02RdQbKurP6H/JWwVp+VpoIysbFt9le9R69+DL4=";
meta = {
description = "Pyright extension for coc.nvim";
homepage = "https://github.com/fannheyward/coc-pyright";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}

View File

@@ -0,0 +1,343 @@
diff --git i/package-lock.json w/package-lock.json
index e71a2d6..26f6d1d 100644
--- i/package-lock.json
+++ w/package-lock.json
@@ -410,6 +410,8 @@
},
"node_modules/ansi-regex": {
"version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -418,6 +420,8 @@
},
"node_modules/ansi-styles": {
"version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -447,6 +451,8 @@
},
"node_modules/balanced-match": {
"version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true,
"license": "MIT"
},
@@ -473,6 +479,8 @@
},
"node_modules/brace-expansion": {
"version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -502,6 +510,8 @@
},
"node_modules/chalk": {
"version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -534,6 +544,8 @@
},
"node_modules/color-convert": {
"version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -545,16 +557,22 @@
},
"node_modules/color-name": {
"version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"license": "MIT"
},
"node_modules/concat-map": {
"version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true,
"license": "MIT"
},
"node_modules/cross-spawn": {
"version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -603,6 +621,8 @@
},
"node_modules/doctrine": {
"version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -619,6 +639,8 @@
},
"node_modules/escape-string-regexp": {
"version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -713,6 +735,8 @@
},
"node_modules/eslint/node_modules/glob-parent": {
"version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -774,6 +798,8 @@
},
"node_modules/esutils": {
"version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
@@ -823,6 +849,8 @@
},
"node_modules/file-entry-cache": {
"version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -861,6 +889,8 @@
},
"node_modules/flat-cache": {
"version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
+ "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -888,16 +918,22 @@
},
"node_modules/flatted": {
"version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz",
+ "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==",
"dev": true,
"license": "ISC"
},
"node_modules/fs.realpath": {
"version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true,
"license": "ISC"
},
"node_modules/fuzzy-search": {
"version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/fuzzy-search/-/fuzzy-search-3.2.1.tgz",
+ "integrity": "sha512-vAcPiyomt1ioKAsAL2uxSABHJ4Ju/e4UeDM+g1OlR0vV4YhLGMNsdLNvZTpEDY4JCSt0E4hASCNM5t2ETtsbyg==",
"license": "ISC"
},
"node_modules/glob": {
@@ -922,6 +958,8 @@
},
"node_modules/glob-parent": {
"version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"license": "ISC",
"dependencies": {
"is-glob": "^4.0.1"
@@ -973,6 +1011,8 @@
},
"node_modules/has-flag": {
"version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1006,6 +1046,8 @@
},
"node_modules/imurmurhash": {
"version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1014,6 +1056,8 @@
},
"node_modules/inflight": {
"version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -1023,11 +1067,15 @@
},
"node_modules/inherits": {
"version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true,
"license": "ISC"
},
"node_modules/is-extglob": {
"version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -1035,6 +1083,8 @@
},
"node_modules/is-glob": {
"version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"license": "MIT",
"dependencies": {
"is-extglob": "^2.1.1"
@@ -1062,6 +1112,8 @@
},
"node_modules/isexe": {
"version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
"license": "ISC"
},
@@ -1085,6 +1137,8 @@
},
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
"dev": true,
"license": "MIT"
},
@@ -1118,6 +1172,8 @@
},
"node_modules/lodash.merge": {
"version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true,
"license": "MIT"
},
@@ -1167,11 +1223,15 @@
},
"node_modules/ms": {
"version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true,
"license": "MIT"
},
"node_modules/natural-compare": {
"version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"dev": true,
"license": "MIT"
},
@@ -1196,6 +1256,8 @@
},
"node_modules/once": {
"version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -1281,6 +1343,8 @@
},
"node_modules/path-key": {
"version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1401,6 +1465,8 @@
},
"node_modules/shebang-command": {
"version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1412,6 +1478,8 @@
},
"node_modules/shebang-regex": {
"version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1429,6 +1497,8 @@
},
"node_modules/strip-ansi": {
"version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1452,6 +1522,8 @@
},
"node_modules/supports-color": {
"version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1463,6 +1535,8 @@
},
"node_modules/text-table": {
"version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
"dev": true,
"license": "MIT"
},
@@ -1618,6 +1692,8 @@
},
"node_modules/which": {
"version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -1632,6 +1708,8 @@
},
"node_modules/wrappy": {
"version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true,
"license": "ISC"
},

View File

@@ -0,0 +1,31 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "coc-sh";
version = "1.2.4";
src = fetchFromGitHub {
owner = "josa42";
repo = "coc-sh";
tag = "v${finalAttrs.version}";
hash = "sha256-Oq9/9/tSt+S8Oai3AgPKUzdccieSD4LudmQAN4ljHwI=";
};
patches = [
# Ensure that all packages have `resolved` and `integrity` fields
./fix-package-lock.patch
];
npmDepsHash = "sha256-N8bXRtTEKu9yuUnfv4oIokM74KWnqfTLVh5EvS0b1sw=";
meta = {
description = "bash-language-server for coc.nvim";
homepage = "https://github.com/josa42/coc-sh";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})

View File

@@ -0,0 +1,46 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coc-spell-checker";
version = "1.3.2-unstable-2022-12-18";
src = fetchFromGitHub {
owner = "iamcco";
repo = "coc-spell-checker";
# Upstream has no tagged releases
rev = "51c484169de17b5317e54f5cf06bcd3fb04477e7";
hash = "sha256-WimL7rE+hYW8JoWDnsL3r1zAoEDZBDy6NY2i6Wblm8c=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-nMDcc8dP0L7vpIj6Q1HOJyFCkDZ+19/IdbONxBj1jq8=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
yarnInstallHook
nodejs
];
NODE_OPTIONS = "--openssl-legacy-provider";
passthru.updateScript = nix-update-script { };
meta = {
description = "Basic spell checker that works well with camelCase code for (Neo)vim";
homepage = "https://github.com/iamcco/coc-spell-checker";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "coc-toml";
version = "1.2.5";
src = fetchFromGitHub {
owner = "kkiyama117";
repo = "coc-toml";
tag = "v${finalAttrs.version}";
hash = "sha256-iyQRa4h23mfmCmujNYYV8Y+82+HLYUtXgBzU1dtovYc=";
};
nativeBuildInputs = [
yarnBuildHook
yarnConfigHook
yarnInstallHook
nodejs
];
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-jZZUrpi3Bg4qQ/NyUDPW7zNuUz/399wAf+gdeZHp+B0=";
};
meta = {
description = "Toml extension for coc.nvim";
homepage = "https://github.com/kkiyama117/coc-toml";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ soopyc ];
};
})

View File

@@ -0,0 +1,11 @@
#badge {
inline-size: 225px;
block-size: 80px;
background-image: url("logo.png");
background-size: contain;
background-repeat: no-repeat;
}
#brand::before {
content: "${PRETTY_NAME}";
}

View File

@@ -0,0 +1,270 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
bashInteractive,
cacert,
coreutils,
dbus,
docbook_xml_dtd_43,
docbook_xsl,
findutils,
gettext,
git,
glib,
glib-networking,
gnused,
gnutls,
hostname,
iproute2,
json-glib,
krb5,
libssh,
libxcrypt,
libxslt,
makeWrapper,
nodejs,
nixosTests,
nix-update-script,
openssh,
openssl,
pam,
pkg-config,
polkit,
python3Packages,
sscg,
systemd,
udev,
xmlto,
# Enables lightweight NixOS branding, replacing the default Cockpit icons
withBranding ? true,
nixos-icons,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cockpit";
version = "348";
src = fetchFromGitHub {
owner = "cockpit-project";
repo = "cockpit";
tag = finalAttrs.version;
hash = "sha256-JO+tHrG1fxfDRdGHIDZ6TBLug/6p/vB8RkxC9TLoOuk=";
fetchSubmodules = true;
};
nativeBuildInputs = [
autoreconfHook
makeWrapper
docbook_xml_dtd_43
docbook_xsl
findutils
gettext
git
(lib.getBin libxslt)
nodejs
openssl
pam
pkg-config
python3Packages.setuptools
systemd
xmlto
];
buildInputs = [
(lib.getDev glib)
libxcrypt
gnutls
json-glib
krb5
libssh
polkit
udev
python3Packages.pygobject3
python3Packages.pip
bashInteractive
];
postPatch = ''
# Instead of requiring Internet access to do an npm install to generate the package-lock.json
# it copies the package-lock.json already present in the node_modules folder fetched as a git
# submodule.
echo "#!/bin/sh" > test/node_modules
substituteInPlace src/tls/cockpit-certificate-helper.in \
--replace-fail 'COCKPIT_CONFIG="@sysconfdir@/cockpit"' 'COCKPIT_CONFIG=/etc/cockpit'
substituteInPlace src/tls/cockpit-certificate-ensure.c \
--replace-fail '#define COCKPIT_SELFSIGNED_PATH PACKAGE_SYSCONF_DIR COCKPIT_SELFSIGNED_FILENAME' '#define COCKPIT_SELFSIGNED_PATH "/etc" COCKPIT_SELFSIGNED_FILENAME'
substituteInPlace src/common/cockpitconf.c \
--replace-fail 'const char *cockpit_config_dirs[] = { PACKAGE_SYSCONF_DIR' 'const char *cockpit_config_dirs[] = { "/etc"'
substituteInPlace src/**/*.c \
--replace-quiet "/bin/sh" "${lib.getExe bashInteractive}"
# instruct users with problems to create a nixpkgs issue instead of nagging upstream directly
substituteInPlace configure.ac \
--replace-fail 'devel@lists.cockpit-project.org' 'https://github.com/NixOS/nixpkgs/issues/new?assignees=&labels=0.kind%3A+bug&template=bug_report.md&title=cockpit%25'
patchShebangs \
build.js \
test/common/pixel-tests \
test/common/run-tests \
test/common/tap-cdp \
tools/escape-to-c \
tools/make-compile-commands \
tools/node-modules \
tools/termschutz \
tools/webpack-make.js \
tools/test-driver \
test/common/static-code
for f in node_modules/.bin/*; do
patchShebangs $(realpath $f)
done
export HOME=$(mktemp -d)
cp node_modules/.package-lock.json package-lock.json
for f in pkg/**/*.js pkg/**/*.jsx test/**/* src/**/*; do
# some files substituteInPlace report as missing and it's safe to ignore them
substituteInPlace "$(realpath "$f")" \
--replace-quiet '"/usr/bin/' '"' \
--replace-quiet '"/bin/' '"' \
--replace-quiet ' /bin/' ' ' \
|| true
done
substituteInPlace src/common/Makefile-common.am \
--replace-warn 'TEST_PROGRAM += test-pipe' "" # skip test-pipe because it hangs the build
substituteInPlace src/ws/Makefile-ws.am \
--replace-warn 'TEST_PROGRAM += test-compat' ""
substituteInPlace test/pytest/*.py \
--replace-quiet "'bash" "'${bashInteractive}/bin/bash"
echo "m4_define(VERSION_NUMBER, [${finalAttrs.version}])" > version.m4
# hardcode libexecdir, I am assuming that cockpit only use it to find it's binaries
printf 'def get_libexecdir() -> str:\n\treturn "%s"' "$out/libexec" >> src/cockpit/packages.py
# patch paths used as visibility conditions in apps
substituteInPlace pkg/*/manifest.json \
--replace-warn '"/usr/bin' '"/run/current-system/sw/bin' \
--replace-warn '"/usr/sbin' '"/run/current-system/sw/bin' \
--replace-warn '"/usr/share' '"/run/current-system/sw/share' \
--replace-warn '"/lib/systemd' '"/run/current-system/sw/lib/systemd'
# replace reference to system python interpreter, used for e.g. sosreport
substituteInPlace pkg/lib/python.ts \
--replace-fail /usr/libexec/platform-python ${python3Packages.python.interpreter}
'';
configureFlags = [
"--enable-prefix-only=yes"
"--disable-pcp" # TODO: figure out how to package its dependency
"--with-default-session-path=/run/wrappers/bin:/run/current-system/sw/bin"
"--with-admin-group=root" # TODO: really? Maybe "wheel"?
];
enableParallelBuilding = true;
fixupPhase = ''
runHook preFixup
patchShebangs $out/libexec/*
wrapProgram $out/libexec/cockpit-certificate-helper \
--prefix PATH : ${
lib.makeBinPath [
coreutils
sscg
openssl
]
} \
--run 'cd $(mktemp -d)'
for binary in $out/bin/cockpit-bridge $out/libexec/cockpit-askpass; do
chmod +x $binary
wrapProgram $binary \
--prefix PYTHONPATH : $out/${python3Packages.python.sitePackages}
done
patchShebangs $out/share/cockpit/issue/update-issue
wrapProgram $out/share/cockpit/issue/update-issue \
--prefix PATH : ${
lib.makeBinPath [
gnused
hostname
iproute2
]
}
substituteInPlace $out/${python3Packages.python.sitePackages}/cockpit/_vendor/systemd_ctypes/libsystemd.py \
--replace-warn libsystemd.so.0 ${systemd}/lib/libsystemd.so.0
substituteInPlace $out/share/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy \
--replace-fail /usr $out
substituteInPlace $out/lib/systemd/*/* \
--replace-warn /bin /run/current-system/sw/bin
${lib.optionalString withBranding ''
mkdir -p "$out/share/cockpit/branding/nixos"
pushd "$out/share/cockpit/branding/nixos"
icons="${nixos-icons}/share/icons/hicolor"
ln -s "$icons/16x16/apps/nix-snowflake.png" favicon.ico
ln -s "$icons/256x256/apps/nix-snowflake.png" logo.png
ln -s "$icons/256x256/apps/nix-snowflake.png" apple-touch-icon.png
cp "${./branding.css}" branding.css
popd
''}
runHook postFixup
'';
nativeCheckInputs = [ python3Packages.pytestCheckHook ];
checkInputs = [
bashInteractive
cacert
dbus
glib-networking
openssh
];
preCheck = ''
export GIO_EXTRA_MODULES=$GIO_EXTRA_MODULES:${glib-networking}/lib/gio/modules
export G_DEBUG=fatal-criticals
export G_MESSAGES_DEBUG=cockpit-ws,cockpit-wrapper,cockpit-bridge
export PATH=$PATH:$(pwd)
make check -j$NIX_BUILD_CORES || true
npm run eslint
npm run stylelint
'';
passthru = {
tests = { inherit (nixosTests) cockpit; };
updateScript = nix-update-script { };
};
meta = {
description = "Web-based graphical interface for servers";
mainProgram = "cockpit-bridge";
homepage = "https://cockpit-project.org/";
changelog = "https://cockpit-project.org/blog/cockpit-${finalAttrs.version}.html";
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [
lucasew
andre4ik3
];
};
})

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchzip,
buildFHSEnv,
}:
let
version = "23.1.14";
pname = "cockroachdb";
# For several reasons building cockroach from source has become
# nearly impossible. See https://github.com/NixOS/nixpkgs/pull/152626
# Therefore we use the pre-build release binary and wrap it with buildFHSUserEnv to
# work on nix.
# You can generate the hashes with
# nix flake prefetch <url>
srcs = {
aarch64-linux = fetchzip {
url = "https://binaries.cockroachdb.com/cockroach-v${version}.linux-arm64.tgz";
hash = "sha256-cwczzmSKKQs/DN6WZ/FF6nJC82Pu47akeDqWdBMgdz0=";
};
x86_64-linux = fetchzip {
url = "https://binaries.cockroachdb.com/cockroach-v${version}.linux-amd64.tgz";
hash = "sha256-goCBE+zv9KArdoMsI48rlISurUM0bL/l1OEYWQKqzv0=";
};
};
src =
srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
in
buildFHSEnv {
inherit pname version;
runScript = "${src}/cockroach";
extraInstallCommands = ''
cp -P $out/bin/cockroachdb $out/bin/cockroach
'';
meta = with lib; {
homepage = "https://www.cockroachlabs.com";
description = "Scalable, survivable, strongly-consistent SQL database";
license = with licenses; [
bsl11
mit
cockroachdb-community-license
];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
platforms = [
"aarch64-linux"
"x86_64-linux"
];
maintainers = with maintainers; [
rushmorem
thoughtpolice
];
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
stdenv,
libgit2,
}:
rustPlatform.buildRustPackage rec {
pname = "cocogitto";
version = "6.3.0";
src = fetchFromGitHub {
owner = "oknozor";
repo = "cocogitto";
tag = version;
hash = "sha256-ij5vpIpqCYGNPNWPY47rWmMLEgBh+wtVmLRt11S14rE=";
};
cargoHash = "sha256-wfq1W9zjC0phPUr6SaLv8Ia5aQk/+1ujOTo0241X7AY=";
# Test depend on git configuration that would likely exist in a normal user environment
# and might be failing to create the test repository it works in.
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ libgit2 ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd cog \
--bash <($out/bin/cog generate-completions bash) \
--fish <($out/bin/cog generate-completions fish) \
--zsh <($out/bin/cog generate-completions zsh)
'';
meta = with lib; {
description = "Set of cli tools for the conventional commit and semver specifications";
mainProgram = "cog";
homepage = "https://github.com/oknozor/cocogitto";
license = licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
bison,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cocom";
version = "0.996";
src = fetchurl {
url = "mirror://sourceforge/cocom/cocom-${finalAttrs.version}.tar.gz";
hash = "sha256-4UOrVW15o17zHsHiQIl8m4qNC2aT5QorbkfX/UsgBRk=";
};
env = {
RANLIB = "${stdenv.cc.targetPrefix}gcc-ranlib";
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-int"
"-Wno-error=implicit-function-declaration"
];
};
autoreconfFlags = "REGEX";
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
bison
];
hardeningDisable = [ "format" ];
meta = {
description = "Tool set oriented towards the creation of compilers";
homepage = "https://cocom.sourceforge.net/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ puffnfresh ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "cocom";
version = "1.1.3";
src = fetchFromGitHub {
owner = "LamdaLamdaLamda";
repo = "cocom";
rev = "v${version}";
sha256 = "0sl4ivn95sr5pgw2z877gmhyfc4mk9xr457i5g2i4wqnf2jmy14j";
};
cargoHash = "sha256-kfseD0dYNC1IFAamLJee7LozGppE2mZgBMCUHJC0dP4=";
# Tests require network access
doCheck = false;
meta = with lib; {
description = "NTP client";
homepage = "https://github.com/LamdaLamdaLamda/cocom";
license = licenses.gpl3Only;
maintainers = with maintainers; [ fab ];
mainProgram = "cocom";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coconutbattery";
version = "4.0.4,166";
src = fetchzip {
url = "https://coconut-flavour.com/downloads/coconutBattery_${
lib.replaceStrings [ "." "," ] [ "" "_" ] finalAttrs.version
}.zip";
hash = "sha256-ZbxO6pR752pjaBocA/wqyjPCZaUxV051MaHz1gqQjSg=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/Applications/coconutBattery.app
cp -R . $out/Applications/coconutBattery.app
runHook postInstall
'';
meta = {
description = "Standard for battery reading since 2005";
longDescription = ''
With coconutBattery you are always aware of your current battery health.
It shows you live information about the battery quality in your Mac, iPhone and iPad.
'';
homepage = "https://www.coconut-flavour.com/coconutbattery";
license = with lib.licenses; [ unfree ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ stepbrobd ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
];
};
})

View File

@@ -0,0 +1,49 @@
{
stdenv,
lib,
fetchFromGitHub,
buildGoModule,
python3,
}:
buildGoModule rec {
pname = "cod";
version = "0.1.0";
src = fetchFromGitHub {
owner = "dim-an";
repo = "cod";
rev = "v${version}";
hash = "sha256-mT7OkR8fXXTE3TPx9AmH6ehKGLk4CP9euBPs2zVAJnI=";
};
vendorHash = "sha256-kezfBDTgpOTBYKTNlwuP+M5tXU2w/MXz0B5nBJcL1io=";
ldflags = [
"-s"
"-w"
"-X main.GitSha=${src.rev}"
];
nativeCheckInputs = [ python3 ];
preCheck = ''
pushd test/binaries/
for f in *.py; do
patchShebangs ''$f
done
popd
export COD_TEST_BINARY="''${NIX_BUILD_TOP}/go/bin/cod"
substituteInPlace test/learn_test.go --replace TestLearnArgparseSubCommand SkipLearnArgparseSubCommand
'';
meta = with lib; {
description = "Tool for generating Bash/Fish/Zsh autocompletions based on `--help` output";
homepage = "https://github.com/dim-an/cod/";
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
broken = stdenv.hostPlatform.isDarwin;
mainProgram = "cod";
};
}

View File

@@ -0,0 +1,122 @@
{
mkDerivation,
aeson,
aeson-pretty,
ansi-terminal,
attoparsec,
base,
bytestring,
clock,
containers,
criterion-measurement,
deepseq,
dlist,
filepath,
formatting,
hashable,
haxl,
hspec,
hspec-core,
hspec-expectations,
lib,
mtl,
network-uri,
optparse-applicative,
postgresql-libpq,
postgresql-simple,
QuickCheck,
random,
resourcet,
statistics,
streaming,
text,
time,
transformers,
typed-process,
unliftio,
unliftio-core,
unordered-containers,
uuid,
vector,
}:
mkDerivation {
pname = "codd";
version = "0.1.6";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson
aeson-pretty
ansi-terminal
attoparsec
base
bytestring
clock
containers
deepseq
dlist
filepath
formatting
hashable
haxl
mtl
network-uri
postgresql-libpq
postgresql-simple
resourcet
streaming
text
time
transformers
unliftio
unliftio-core
unordered-containers
vector
];
executableHaskellDepends = [
base
optparse-applicative
postgresql-simple
text
time
];
testHaskellDepends = [
aeson
attoparsec
base
containers
filepath
hashable
hspec
hspec-core
mtl
network-uri
postgresql-simple
QuickCheck
random
resourcet
streaming
text
time
typed-process
unliftio
uuid
];
benchmarkHaskellDepends = [
aeson
base
criterion-measurement
deepseq
hspec
hspec-core
hspec-expectations
statistics
streaming
text
vector
];
homepage = "https://github.com/mzabani/codd#readme";
license = lib.licenses.bsd3;
mainProgram = "codd";
}

View File

@@ -0,0 +1,53 @@
{
lib,
fetchFromGitHub,
haskell,
haskellPackages,
}:
##############
# To upgrade codd you typically only need to change the version, revision and SHA hash
# in this very file.
# If codd's dependencies change, however, clone codd at https://github.com/mzabani/codd,
# checkout the desired tag and run `cabal2nix .` to produce and replace the generated.nix
# file. Finally, do change the version in this file.
##############
let
# Haxl has relatively tight version requirements and is thus often marked as broken.
haxlJailbroken = haskell.lib.markUnbroken (haskell.lib.doJailbreak haskellPackages.haxl);
generated = haskellPackages.callPackage ./generated.nix { haxl = haxlJailbroken; };
derivationWithVersion = haskell.lib.compose.overrideCabal rec {
version = "0.1.6";
src = fetchFromGitHub {
owner = "mzabani";
repo = "codd";
rev = "refs/tags/v${version}";
hash = "sha256-KdZCL09TERy/PolQyYYykEbPtG5yhxrLZSSo9n6p2WE=";
};
# We only run codd's tests that don't require postgresql nor strace. We need to support unix sockets in codd's test suite
# before enabling postgresql's tests, and SystemResourcesSpecs might fail on macOS because of the need for strace and parsing
# libc calls. Not that we really gain much from running SystemResourcesSpecs here anyway.
testFlags = [
"--skip"
"/DbDependentSpecs/"
"--skip"
"/SystemResourcesSpecs/"
];
isLibrary = false;
testToolDepends = [ haskellPackages.hspec-discover ];
description = "CLI tool that applies postgres SQL migrations atomically with schema equality checks";
homepage = "https://github.com/mzabani/codd";
changelog = "https://github.com/mzabani/codd/releases/tag/v${version}";
maintainers = with lib.maintainers; [ mzabani ];
} generated;
in
haskell.lib.compose.justStaticExecutables derivationWithVersion

View File

@@ -0,0 +1,104 @@
{
lib,
stdenv,
callPackage,
vscode-generic,
fetchurl,
appimageTools,
undmg,
commandLineArgs ? "",
useVSCodeRipgrep ? stdenv.hostPlatform.isDarwin,
}:
let
inherit (stdenv) hostPlatform;
finalCommandLineArgs = "--update=false " + commandLineArgs;
sources = {
x86_64-linux = fetchurl {
url = "https://downloads.cursor.com/production/3ccce8f55d8cca49f6d28b491a844c699b8719a3/linux/x64/Cursor-1.6.45-x86_64.AppImage";
hash = "sha256-MlrevU26gD6hpZbqbdKQwnzJbm5y9SVSb3d0BGnHtpc=";
};
aarch64-linux = fetchurl {
url = "https://downloads.cursor.com/production/3ccce8f55d8cca49f6d28b491a844c699b8719a3/linux/arm64/Cursor-1.6.45-aarch64.AppImage";
hash = "sha256-eFHYRwVXhWB3zCnJFYodIxjR2ewP8ETgwyjBdB86oTk=";
};
x86_64-darwin = fetchurl {
url = "https://downloads.cursor.com/production/3ccce8f55d8cca49f6d28b491a844c699b8719a3/darwin/x64/Cursor-darwin-x64.dmg";
hash = "sha256-UGmMX9Wr69i2EqQSLkj9/ROs8HpLtc/x0IYDJdzvD6U=";
};
aarch64-darwin = fetchurl {
url = "https://downloads.cursor.com/production/3ccce8f55d8cca49f6d28b491a844c699b8719a3/darwin/arm64/Cursor-darwin-arm64.dmg";
hash = "sha256-lcuJiAgHXPEUZHNeanBq10znXKFKJ6yrluuZjdaQbyA=";
};
};
source = sources.${hostPlatform.system};
in
(callPackage vscode-generic rec {
inherit useVSCodeRipgrep;
commandLineArgs = finalCommandLineArgs;
version = "1.6.45";
pname = "cursor";
# You can find the current VSCode version in the About dialog:
# workbench.action.showAboutDialog (Help: About)
vscodeVersion = "1.99.3";
executableName = "cursor";
longName = "Cursor";
shortName = "cursor";
libraryName = "cursor";
iconName = "cursor";
src =
if hostPlatform.isLinux then
appimageTools.extract {
inherit pname version;
src = source;
}
else
source;
sourceRoot =
if hostPlatform.isLinux then "${pname}-${version}-extracted/usr/share/cursor" else "Cursor.app";
tests = { };
updateScript = ./update.sh;
# Editing the `cursor` binary within the app bundle causes the bundle's signature
# to be invalidated, which prevents launching starting with macOS Ventura, because Cursor is notarized.
# See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information.
dontFixup = stdenv.hostPlatform.isDarwin;
# Cursor has no wrapper script.
patchVSCodePath = false;
meta = {
description = "AI-powered code editor built on vscode";
homepage = "https://cursor.com";
changelog = "https://cursor.com/changelog";
license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [
aspauldingcode
prince213
];
platforms = [
"aarch64-linux"
"x86_64-linux"
]
++ lib.platforms.darwin;
mainProgram = "cursor";
};
}).overrideAttrs
(oldAttrs: {
nativeBuildInputs =
(oldAttrs.nativeBuildInputs or [ ]) ++ lib.optionals hostPlatform.isDarwin [ undmg ];
passthru = (oldAttrs.passthru or { }) // {
inherit sources;
};
})

View File

@@ -0,0 +1,39 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq coreutils common-updater-scripts
set -eu -o pipefail
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; code-cursor.version or (lib.getVersion code-cursor)" | tr -d '"')
declare -A platforms=( [x86_64-linux]='linux-x64' [aarch64-linux]='linux-arm64' [x86_64-darwin]='darwin-x64' [aarch64-darwin]='darwin-arm64' )
declare -A updates=( )
first_version=""
for platform in ${!platforms[@]}; do
api_platform=${platforms[$platform]}
result=$(curl -s "https://api2.cursor.sh/updates/api/download/stable/$api_platform/cursor")
version=$(echo $result | jq -r '.version')
if [[ "$version" == "$currentVersion" ]]; then
exit 0
fi
if [[ -z "$first_version" ]]; then
first_version=$version
first_platform=$platform
elif [[ "$version" != "$first_version" ]]; then
>&2 echo "Multiple versions found: $first_version ($first_platform) and $version ($platform)"
exit 1
fi
url=$(echo $result | jq -r '.downloadUrl')
# Exits with code 22 if not downloadable
curl --output /dev/null --silent --head --fail "$url"
updates+=( [$platform]="$result" )
done
# Install updates
for platform in ${!updates[@]}; do
result=${updates[$platform]}
version=$(echo $result | jq -r '.version')
url=$(echo $result | jq -r '.downloadUrl')
source=$(nix-prefetch-url "$url" --name "cursor-$version")
hash=$(nix-hash --to-sri --type sha256 "$source")
update-source-version code-cursor $version $hash "$url" --system=$platform --ignore-same-version --source-key="sources.$platform"
done

View File

@@ -0,0 +1,47 @@
{
lib,
stdenvNoCC,
fetchurl,
makeBinaryWrapper,
jre,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "code-maat";
version = "1.0.4";
src = fetchurl {
url = "https://github.com/adamtornhill/code-maat/releases/download/v${finalAttrs.version}/code-maat-${finalAttrs.version}-standalone.jar";
hash = "sha256-QoeuIDSQGERFD3aVR7xEl6DaGm0cf6b63IWHBeZ0O18=";
};
dontUnpack = true;
nativeBuildInputs = [
makeBinaryWrapper
];
installPhase =
let
jar = "$out/libexec/code-maat/code-maat.jar";
in
''
runHook preInstall
install -D ${finalAttrs.src} ${jar}
mkdir -p "$out/bin"
makeWrapper "${jre}/bin/java" "$out/bin/code-maat" \
--add-flags "-jar ${jar}"
runHook postInstall
'';
meta = with lib; {
description = "Command line tool to mine and analyze data from version-control systems";
mainProgram = "code-maat";
homepage = "https://github.com/adamtornhill/code-maat";
platforms = platforms.unix;
license = licenses.gpl3;
maintainers = with maintainers; [ sir4ur0n ];
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
libiconv,
}:
rustPlatform.buildRustPackage rec {
pname = "code-minimap";
version = "0.6.8";
src = fetchFromGitHub {
owner = "wfxr";
repo = "code-minimap";
rev = "v${version}";
sha256 = "sha256-unf7gFc/tQiUw3VqQ0KC96Srxn1E27WsmJviSggaCF4=";
};
cargoHash = "sha256-35qMpxROBnXfnTIAkCRUg7zRQTvSIIA2qGD0Vu9r488=";
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
meta = with lib; {
description = "High performance code minimap render";
homepage = "https://github.com/wfxr/code-minimap";
license = with licenses; [
asl20 # or
mit
];
maintainers = with maintainers; [ bsima ];
mainProgram = "code-minimap";
};
}

View File

@@ -0,0 +1,38 @@
{
stdenv,
lib,
fetchFromGitHub,
nautilus-python,
python3,
}:
stdenv.mkDerivation {
pname = "code-nautilus";
version = "0-unstable-2024-09-11";
src = fetchFromGitHub {
owner = "harry-cpp";
repo = "code-nautilus";
rev = "8ea0ce78f3f1f7a6af5f9e9cf93fc3e70015f61e";
sha256 = "u10laS3BwUVCJYlQ6WivU7o/sFFv6cTeV+uxBEdD7oA=";
};
buildInputs = [
nautilus-python
python3.pkgs.pygobject3
];
installPhase = ''
runHook preInstall
install -Dm555 ./code-nautilus.py -t $out/share/nautilus-python/extensions
runHook postInstall
'';
meta = with lib; {
description = "VSCode extension for Nautilus: 'Open in Code'";
homepage = "https://github.com/harry-cpp/code-nautilus";
license = licenses.unlicense;
platforms = platforms.linux;
maintainers = with maintainers; [ berrij ];
};
}

1699
pkgs/by-name/co/code2prompt/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "code2prompt";
version = "1.1.0";
src = fetchFromGitHub {
owner = "mufeedvh";
repo = "code2prompt";
rev = "v${version}";
hash = "sha256-KZqh0Vq4Mn56PhUO1JUzVpNBAGOZqUAsj31Cj5K+Lyk=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
# src is missing Cargo.lock
ln -s ${./Cargo.lock} Cargo.lock
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
meta = {
description = "CLI tool that converts your codebase into a single LLM prompt with a source tree, prompt templating, and token counting";
homepage = "https://github.com/mufeedvh/code2prompt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ heisfer ];
mainProgram = "code2prompt";
};
}

View File

@@ -0,0 +1,44 @@
{
fetchFromGitea,
installShellFiles,
lib,
openssl,
pkg-config,
rustPlatform,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "codeberg-cli";
version = "0.5.1";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "Aviac";
repo = "codeberg-cli";
rev = "v${version}";
hash = "sha256-81435dgw7fy4igUN3TYNjRans8uRZ/6TQWBxu0benwU=";
};
cargoHash = "sha256-1E7UuDbJKrnhMQI6trk7nHkeywCPFg1021pQhRcb4kQ=";
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [ openssl ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd berg \
--bash <($out/bin/berg completion bash) \
--fish <($out/bin/berg completion fish) \
--zsh <($out/bin/berg completion zsh)
'';
meta = with lib; {
description = "CLI Tool for Codeberg similar to gh and glab";
homepage = "https://codeberg.org/Aviac/codeberg-cli";
license = with licenses; [ agpl3Plus ];
maintainers = with maintainers; [ robwalt ];
mainProgram = "berg";
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
fetchFromGitea,
buildGoModule,
nix-update-script,
}:
buildGoModule rec {
pname = "codeberg-pages";
version = "6.3";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "Codeberg";
repo = "pages-server";
rev = "v${version}";
hash = "sha256-5+4yKcXyKSg7Q2h7W3G6AYkIOmYA4D4DDjdLK57lwdw=";
};
vendorHash = "sha256-EefUX5MEQrJGtUbX/bINcMSJQjnnLzKQt04hENY8G2E=";
postPatch = ''
# disable httptest
rm server/handler/handler_test.go
'';
ldflags = [
"-s"
"-w"
"-X"
"codeberg.org/codeberg/pages/server/version.Version=${version}"
];
tags = [
"sqlite"
"sqlite_unlock_notify"
"netgo"
];
passthru.updateScript = nix-update-script { };
meta = {
mainProgram = "pages";
maintainers = with lib.maintainers; [
laurent-f1z1
christoph-heiss
];
license = lib.licenses.eupl12;
homepage = "https://codeberg.org/Codeberg/pages-server";
description = "Static websites hosting from Gitea repositories";
changelog = "https://codeberg.org/Codeberg/pages-server/releases/tag/v${version}";
};
}

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);

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
nix-update-script,
rustPlatform,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "codebook";
version = "0.3.11";
src = fetchFromGitHub {
owner = "blopker";
repo = "codebook";
tag = "v${finalAttrs.version}";
hash = "sha256-4jK5wmYnkQ0WDSSBmWL155fqFwG3SQENWvQuKdsfHF0=";
};
buildAndTestSubdir = "crates/codebook-lsp";
cargoHash = "sha256-FV7Ux+UuM57McQLqKYjgSvCbPCnM7ZOzX/jFEmtOz2o=";
# Integration tests require internet access for dictionaries
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Unholy spellchecker for code";
homepage = "https://github.com/blopker/codebook";
changelog = "https://github.com/blopker/codebook/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
jpds
];
mainProgram = "codebook-lsp";
platforms = with lib.platforms; unix ++ windows;
};
})

View File

@@ -0,0 +1,46 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "codebraid";
version = "0.11.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "gpoore";
repo = "codebraid";
rev = "v${version}";
hash = "sha256-E9vzGK9ZEVwF+UBpSkdM+hm6vINen/A+LgnnPpc77QQ=";
};
nativeBuildInputs = with python3Packages; [ setuptools ];
propagatedBuildInputs = with python3Packages; [ bespon ];
# unfortunately upstream doesn't contain tests
checkPhase = ''
$out/bin/codebraid --help > /dev/null
'';
meta = with lib; {
homepage = "https://github.com/gpoore/codebraid";
description = ''
Live code in Pandoc Markdown.
Codebraid is a Python program that enables executable code in Pandoc
Markdown documents. Using Codebraid can be as simple as adding a class to
your code blocks' attributes, and then running codebraid rather than
pandoc to convert your document from Markdown to another format.
codebraid supports almost all of pandoc's options and passes them to
pandoc internally.
Codebraid provides two options for executing code. It includes a built-in
code execution system that currently supports Python 3.5+, Julia, Rust,
R, Bash, and JavaScript. Code can also be executed using Jupyter kernels,
with support for rich output like plots.
'';
license = licenses.bsd3;
maintainers = with maintainers; [ synthetica ];
mainProgram = "codebraid";
};
}

148
pkgs/by-name/co/codebuff/package-lock.json generated Normal file
View File

@@ -0,0 +1,148 @@
{
"name": "codebuff",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"codebuff": "^1.0.496"
}
},
"node_modules/chownr": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
"license": "ISC",
"engines": {
"node": ">=10"
}
},
"node_modules/codebuff": {
"version": "1.0.496",
"resolved": "https://registry.npmjs.org/codebuff/-/codebuff-1.0.496.tgz",
"integrity": "sha512-kFg8+kgZN7wReREMt89mXz5G78c5EZxiMtjjVb6bZD9JUIb8hYRg5AFPQ5RTFW4cMW21l7qO7HZy8Twvln8Nwg==",
"cpu": [
"x64",
"arm64"
],
"license": "MIT",
"os": [
"darwin",
"linux",
"win32"
],
"dependencies": {
"commander": "^12.0.0",
"tar": "^6.2.0"
},
"bin": {
"codebuff": "index.js"
},
"engines": {
"node": ">=16"
}
},
"node_modules/commander": {
"version": "12.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
"integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
"license": "ISC",
"dependencies": {
"minipass": "^3.0.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/fs-minipass/node_modules/minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
"license": "ISC",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/minipass": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
"integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
"license": "ISC",
"engines": {
"node": ">=8"
}
},
"node_modules/minizlib": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
"license": "MIT",
"dependencies": {
"minipass": "^3.0.0",
"yallist": "^4.0.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/minizlib/node_modules/minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
"license": "ISC",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"license": "MIT",
"bin": {
"mkdirp": "bin/cmd.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/tar": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
"integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
"license": "ISC",
"dependencies": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"minipass": "^5.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"license": "ISC"
}
}
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildNpmPackage,
fetchzip,
}:
buildNpmPackage rec {
pname = "codebuff";
version = "1.0.496";
src = fetchzip {
url = "https://registry.npmjs.org/codebuff/-/codebuff-${version}.tgz";
hash = "sha256-X/quHRF+DrGtbyDbthXENLXI9vKfjhp9WOn6FBgss4g=";
};
npmDepsHash = "sha256-ni7tCSyqXSyowVl1XzGkzoovaN3AawYvmW1cWdeHxgw=";
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
dontNpmBuild = true;
passthru.updateScript = ./update.sh;
meta = {
description = "Use natural language to edit your codebase and run commands from your terminal faster";
homepage = "https://www.codebuff.com/";
downloadPage = "https://www.npmjs.com/package/codebuff";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.malo ];
mainProgram = "codebuff";
};
}

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nodePackages.npm nix-update
set -euo pipefail
version=$(npm view codebuff version)
# Generate updated lock file
cd "$(dirname "${BASH_SOURCE[0]}")"
npm i --package-lock-only codebuff@"$version"
rm -f package.json
# Update version and hases
cd -
nix-update codebuff --version "$version"

View File

@@ -0,0 +1,13 @@
diff --git a/codec2.pc.in b/codec2.pc.in
index ecca704..94fca12 100644
--- a/codec2.pc.in
+++ b/codec2.pc.in
@@ -1,6 +1,5 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
-includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/codec2
+libdir=@CMAKE_INSTALL_LIBDIR@
+includedir=@CMAKE_INSTALL_INCLUDEDIR@/codec2
Name: codec2
Description: A speech codec for 2400 bit/s and below

View File

@@ -0,0 +1,88 @@
{
lib,
testers,
stdenv,
buildPackages,
fetchFromGitHub,
cmake,
freedvSupport ? false,
lpcnet,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "codec2";
version = "1.2.0";
src = fetchFromGitHub {
owner = "drowe67";
repo = "codec2";
rev = finalAttrs.version;
hash = "sha256-69Mp4o3MgV98Fqfai4txv5jQw2WpoPuoWcwHsNAFPQM=";
};
patches = [
# Fix nix-store path dupliucations
./fix-pkg-config.patch
];
outputs = [
"out"
"lib"
"dev"
];
nativeBuildInputs = [
cmake
buildPackages.stdenv.cc # needs to build a C program to run at build time
];
buildInputs = lib.optionals freedvSupport [
lpcnet
];
# we need to unset these variables from stdenv here and then set their equivalents in the cmake flags
# otherwise it will pass the same compiler to the native and cross phases and crash trying to execute
# host binaries (generate_codebook) on the build system.
preConfigure = ''
unset CC
unset CXX
'';
postInstall = ''
install -Dm0755 src/{c2enc,c2dec,c2sim,freedv_rx,freedv_tx,cohpsk_*,fdmdv_*,fsk_*,ldpc_*,ofdm_*} -t $out/bin/
'';
postFixup =
# Swap keyword order to satisfy SWIG parser
''
sed -r -i 's/(\<_Complex)(\s+)(float|double)/\3\2\1/' $dev/include/$pname/freedv_api.h
''
+
# generated cmake module is not compatible with multiple outputs
''
substituteInPlace $dev/lib/cmake/codec2/codec2-config.cmake --replace-fail \
'"''${_IMPORT_PREFIX}/include/codec2' \
"\"$dev/include/codec2"
'';
cmakeFlags = [
# RPATH of binary /nix/store/.../bin/freedv_rx contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
"-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc"
"-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++"
]
++ lib.optionals freedvSupport [
"-DLPCNET=ON"
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Speech codec designed for communications quality speech at low data rates";
homepage = "https://www.rowetel.com/codec2.html";
license = licenses.lgpl21Only;
platforms = platforms.unix;
maintainers = with maintainers; [ markuskowa ];
pkgConfigModules = [ "codec2" ];
};
})

View File

@@ -0,0 +1,128 @@
{
lib,
python3,
fetchPypi,
fetchFromGitHub,
clang,
clang-tools,
cppcheck,
gcc,
makeWrapper,
withClang ? false,
withClangTools ? false,
withCppcheck ? false,
withGcc ? false,
}:
let
python = python3.override {
packageOverrides = self: super: rec {
# codechecker is incompatible with SQLAlchemy greater than 1.3
sqlalchemy = super.sqlalchemy_1_4.overridePythonAttrs (oldAttrs: rec {
version = "1.3.23";
pname = oldAttrs.pname;
src = fetchFromGitHub {
owner = "sqlalchemy";
repo = "sqlalchemy";
rev = "rel_${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-hWA0/f7rQpEfYTg10i0rBK3qeJbw3p6HW7S59rLnD0Q=";
};
doCheck = false;
# That test does not exist in the 1.3 branch so we get an error for disabling it
disabledTestPaths = builtins.filter (
testPath: testPath != "test/ext/mypy"
) oldAttrs.disabledTestPaths;
});
sqlalchemy_1_4 = sqlalchemy;
# The current alembic version is not compatible with SQLAlchemy 1.3 so we need to downgrade it
alembic = super.alembic.overridePythonAttrs (oldAttrs: rec {
pname = "alembic";
version = "1.5.5";
src = fetchPypi {
inherit pname version;
hash = "sha256-3wAowZJ1os/xN+OWF6Oc3NvRFzczuHtr+iV7fAhgITs=";
};
doCheck = false;
dependencies = oldAttrs.dependencies ++ [
super.python-dateutil
super.python-editor
];
});
};
};
python3Packages = python.pkgs;
in
python3Packages.buildPythonApplication rec {
pname = "codechecker";
version = "6.24.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-ftZACUf2lAHokcUXj45LRA7/3goOcIy521cGl6qhR98=";
};
nativeBuildInputs = with python3Packages; [
setuptools
pythonRelaxDepsHook
];
propagatedBuildInputs = with python3Packages; [
distutils # required in python312 to call subcommands (see https://github.com/Ericsson/codechecker/issues/4350)
lxml
sqlalchemy
alembic
portalocker
psutil
multiprocess
thrift
gitpython
types-pyyaml
sarif-tools
pytest
pycodestyle
pylint
mkdocs
coverage
];
pythonRelaxDeps = [
"thrift"
"portalocker"
"types-pyyaml"
"lxml"
"psutil"
"multiprocess"
"gitpython"
"sarif-tools"
"pyyaml"
];
postInstall = ''
wrapProgram "$out/bin/CodeChecker" --prefix PATH : ${
lib.makeBinPath (
[ ]
++ lib.optional withClang clang
++ lib.optional withClangTools clang-tools
++ lib.optional withCppcheck cppcheck
++ lib.optional withGcc gcc
)
}
'';
meta = {
homepage = "https://github.com/Ericsson/codechecker";
changelog = "https://github.com/Ericsson/codechecker/releases/tag/v${version}";
description = "Analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy";
license = with lib.licenses; [
asl20
llvm-exception
];
maintainers = with lib.maintainers; [
zebreus
felixsinger
];
mainProgram = "CodeChecker";
platforms = lib.platforms.darwin ++ lib.platforms.linux;
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "codecov-cli";
version = "10.4.0";
pyproject = true;
src =
(fetchFromGitHub {
owner = "codecov";
repo = "codecov-cli";
tag = "v${version}";
hash = "sha256-R1GFQ81N/e2OX01oSs8Xs+PM0JKVZofiUPADVdxCzWk=";
fetchSubmodules = true;
}).overrideAttrs
(_: {
GIT_CONFIG_COUNT = 1;
GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf";
GIT_CONFIG_VALUE_0 = "git@github.com:";
});
build-system = with python3Packages; [ setuptools ];
pythonRelaxDeps = [
"httpx"
"responses"
"tree-sitter"
];
dependencies = with python3Packages; [
click
httpx
ijson
pyyaml
regex
responses
test-results-parser
tree-sitter
sentry-sdk
wrapt
];
meta = {
description = "Codecov Command Line Interface";
homepage = "https://github.com/codecov/codecov-cli";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ veehaitch ];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
buildGoModule,
fetchFromGitHub,
git,
}:
buildGoModule rec {
pname = "codecrafters-cli";
version = "39";
src = fetchFromGitHub {
owner = "codecrafters-io";
repo = "cli";
tag = "v${version}";
hash = "sha256-yvKPDuORHySSYnsjAW3SrZ9GcrFaGfJYoG7+9IfQEVc=";
# A shortened git commit hash is part of the version output, and is
# needed at build time. Use the `.git` directory to retrieve the
# commit SHA, and remove the directory afterwards since it is not needed
# after that.
leaveDotGit = true;
postFetch = ''
git -C $"$out" rev-parse --short=7 HEAD > $out/COMMIT
rm -rf $out/.git
'';
};
vendorHash = "sha256-5t/bRx3mT66e/efjWbb527ZdKOn3qV3hroqiLwP180g=";
ldflags = [
"-s"
"-w"
"-X github.com/codecrafters-io/cli/internal/utils.Version=${version}"
];
# ldflags based on metadata from git
preBuild = ''
ldflags+=" -X github.com/codecrafters-io/cli/internal/utils.Commit=$(cat COMMIT)"
'';
# We need to disable tests because the tests for respecting .gitignore
# include setting up a global gitignore which doesn't work.
doCheck = false;
nativeBuildInputs = [ git ];
meta = with lib; {
description = "CodeCrafters CLI to run tests";
mainProgram = "codecrafters";
homepage = "https://github.com/codecrafters-io/cli";
maintainers = with maintainers; [ builditluc ];
license = licenses.mit;
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnInstallHook,
nodejs,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "codefresh";
version = "0.89.2";
src = fetchFromGitHub {
owner = "codefresh-io";
repo = "cli";
rev = "v${finalAttrs.version}";
hash = "sha256-Cf3I+w0rVsjsu+m+vE/pOcASYTmsRi0yAQVpJkYbzUU=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-wD3BmWjrFGkNqUhbo2TrWLwgo2o2MiQn7X3fyDYt5dw=";
};
nativeBuildInputs = [
yarnConfigHook
yarnInstallHook
nodejs
];
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
# codefresh needs to read a config file, this is faked out with a subshell
command = "codefresh --cfconfig <(echo 'contexts:') version";
};
meta = {
changelog = "https://github.com/codefresh-io/cli/releases/tag/v${finalAttrs.version}";
description = "CLI tool to interact with Codefresh services";
homepage = "https://github.com/codefresh-io/cli";
license = lib.licenses.mit;
mainProgram = "codefresh";
maintainers = [ lib.maintainers.takac ];
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule (finalAttrs: {
pname = "codegrab";
version = "1.0.7";
src = fetchFromGitHub {
owner = "epilande";
repo = "codegrab";
tag = "v${finalAttrs.version}";
hash = "sha256-gKxvPcAZ8TnECAs3iMkFfZKdaq8vkLz/T9MUBWk4MfQ=";
leaveDotGit = true;
postFetch = ''
cd "$out"
git rev-parse --short HEAD > $out/COMMIT
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
vendorHash = "sha256-u9pVOZOwK6xLdR4tlWN2eBoJZ2ziPEdJv78uCV0Suus=";
checkFlags = [
"-skip=TestParseSizeString"
];
ldflags = [
"-s"
"-w"
"-X=github.com/epilande/codegrab/internal/utils.Version=${finalAttrs.version}"
];
# ldflags based on metadata from git and source
preBuild = ''
ldflags+=" -X=github.com/epilande/codegrab/internal/utils.CommitSHA=$(cat COMMIT)"
'';
meta = {
description = "Interactive CLI tool for selecting and bundling code into a single, LLM-ready output file";
homepage = "https://github.com/epilande/codegrab";
changelog = "https://github.com/epilande/codegrab/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ taha-yassine ];
mainProgram = "grab";
};
})

View File

@@ -0,0 +1,92 @@
{
stdenv,
lib,
fetchurl,
gzip,
autoPatchelfHook,
versionCheckHook,
}:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
plat =
{
x86_64-linux = "linux_x64";
aarch64-linux = "linux_arm";
x86_64-darwin = "macos_x64";
aarch64-darwin = "macos_arm";
}
.${system} or throwSystem;
hash =
{
x86_64-linux = "sha256-noZVrLvkiHP2H3+zWlgqRpKIFxdQzhjl/2XjRpuVYhs=";
aarch64-linux = "sha256-bznlEnBZqF3Vfkt8y9XCgQ5O0yxzlGw9HAoByblZ2A4=";
x86_64-darwin = "sha256-LIbFX5WUlWw+wF3Sj+v+2zDn2xzvDlW8AO/TJsvDa6c=";
aarch64-darwin = "sha256-ANS9FFwrgmRhknpNija9DhO2Znj/RAJhq2GUMZiau6o=";
}
.${system} or throwSystem;
bin = "$out/bin/codeium_language_server";
in
stdenv.mkDerivation (finalAttrs: {
pname = "codeium";
version = "1.46.3";
src = fetchurl {
name = "${finalAttrs.pname}-${finalAttrs.version}.gz";
url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${finalAttrs.version}/language_server_${plat}.gz";
inherit hash;
};
nativeBuildInputs = [ gzip ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
gzip -dc $src > ${bin}
chmod +x ${bin}
runHook postInstall
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/codeium_language_server";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = ./update.sh;
meta = rec {
description = "Codeium language server";
longDescription = ''
Codeium proprietary language server, patched for Nix(OS) compatibility.
bin/language_server_x must be symlinked into the plugin directory, replacing the existing binary.
For example:
```shell
ln -s "$(which codeium_language_server)" /home/a/.local/share/JetBrains/Rider2023.1/codeium/662505c9b23342478d971f66a530cd102ae35df7/language_server_linux_x64
```
'';
homepage = "https://codeium.com/";
downloadPage = homepage;
changelog = homepage;
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ anpin ];
mainProgram = "codeium_language_server";
platforms = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-linux"
"x86_64-darwin"
];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
})

View File

@@ -0,0 +1,35 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused gawk nix-prefetch jq
set -euo pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
NIX_DRV="$ROOT/package.nix"
if [ ! -f "$NIX_DRV" ]; then
echo "ERROR: cannot find package.nix in $ROOT"
exit 1
fi
fetch_arch() {
VER="$1"; ARCH="$2"
URL="https://github.com/Exafunction/codeium/releases/download/language-server-v${VER}/language_server_${ARCH}.gz"
nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "$URL")"
}
replace_hash() {
sed -i "s#$1 = \"sha256-.\{44\}\"#$1 = \"$2\"#" "$NIX_DRV"
}
CODEIUM_VER=$(curl -s "https://api.github.com/repos/Exafunction/codeium/releases/latest" | jq -r .tag_name | grep -oP '\d+\.\d+\.\d+' )
CODEIUM_LINUX_X64_HASH=$(fetch_arch "$CODEIUM_VER" "linux_x64")
CODEIUM_LINUX_AARCH64_HASH=$(fetch_arch "$CODEIUM_VER" "linux_arm")
CODEIUM_DARWIN_X64_HASH=$(fetch_arch "$CODEIUM_VER" "macos_x64")
CODEIUM_DARWIN_AARCH64_HASH=$(fetch_arch "$CODEIUM_VER" "macos_arm")
sed -i "s/version = \".*\"/version = \"$CODEIUM_VER\"/" "$NIX_DRV"
replace_hash "x86_64-linux" "$CODEIUM_LINUX_X64_HASH"
replace_hash "aarch64-linux" "$CODEIUM_LINUX_AARCH64_HASH"
replace_hash "x86_64-darwin" "$CODEIUM_DARWIN_X64_HASH"
replace_hash "aarch64-darwin" "$CODEIUM_DARWIN_AARCH64_HASH"

View File

@@ -0,0 +1,107 @@
diff --git a/Cargo.lock b/Cargo.lock
index a4c40ab..b3451ea 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -378,9 +378,12 @@ dependencies = [
[[package]]
name = "deranged"
-version = "0.3.7"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
[[package]]
name = "either"
@@ -811,6 +814,12 @@ dependencies = [
"getrandom",
]
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
[[package]]
name = "num-integer"
version = "0.1.45"
@@ -1007,6 +1016,12 @@ dependencies = [
"miniz_oxide",
]
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
[[package]]
name = "proc-macro2"
version = "1.0.66"
@@ -1185,18 +1200,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
-version = "1.0.183"
+version = "1.0.193"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c"
+checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.183"
+version = "1.0.193"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816"
+checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
dependencies = [
"proc-macro2",
"quote",
@@ -1356,12 +1371,14 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.25"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
+ "num-conv",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -1369,16 +1386,17 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.11"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
+ "num-conv",
"time-core",
]

View File

@@ -0,0 +1,61 @@
{
lib,
rustPlatform,
fetchFromGitHub,
makeBinaryWrapper,
pkg-config,
oniguruma,
ffmpeg,
git,
}:
rustPlatform.buildRustPackage {
pname = "codemov";
version = "0-unstable-2023-08-08";
src = fetchFromGitHub {
owner = "sloganking";
repo = "codemov";
rev = "8a4d6e50c21010866ca06f845f30c2aa54c09854";
hash = "sha256-nOqh8kXS5mx0AM4NvIcwvC0lAZRHsQwrxI0c+9PeroU=";
};
cargoHash = "sha256-lelmkdbqKRjSkJIkF5TWJ6LyCTo2j11hZf9QxIPBoOo=";
cargoPatches = [
# fix build with rust 1.80 by updating time crate version
# https://github.com/sloganking/codemov/pull/16
./fix-build-with-rust-1.80.patch
];
nativeBuildInputs = [
makeBinaryWrapper
pkg-config
];
buildInputs = [
oniguruma
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
};
postInstall = ''
wrapProgram $out/bin/codemov \
--prefix PATH : ${
lib.makeBinPath [
ffmpeg
git
]
}
'';
meta = {
description = "Create a video of how a git repository's code changes over time";
homepage = "https://github.com/sloganking/codemov";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "codemov";
};
}

View File

@@ -0,0 +1,27 @@
{
buildGoModule,
lib,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "codeowners";
version = "1.2.1";
src = fetchFromGitHub {
owner = "hmarr";
repo = "codeowners";
rev = "v${version}";
hash = "sha256-PMT3ihxCD4TNgTZOD4KB9Od1djIhnlMa8zuD6t1OieU=";
};
vendorHash = "sha256-CpGlw4xe+gg2IRov9Atd8Z7XbXs1zkIYxvBVpsY/gxg=";
meta = with lib; {
description = "CLI and Go library for Github's CODEOWNERS file";
mainProgram = "codeowners";
homepage = "https://github.com/hmarr/codeowners";
license = licenses.mit;
maintainers = with maintainers; [ yorickvp ];
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchzip,
zlib,
xorg,
freetype,
jdk17,
curl,
}:
stdenv.mkDerivation rec {
pname = "codeql";
version = "2.23.0";
dontConfigure = true;
dontBuild = true;
dontStrip = true;
src = fetchzip {
url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip";
hash = "sha256-8T1aOy2okhwj2rFz3jUpUm2JaJcrXdB6KpSD8btCEx4=";
};
nativeBuildInputs = [
zlib
xorg.libX11
xorg.libXext
xorg.libXi
xorg.libXtst
xorg.libXrender
freetype
jdk17
(lib.getLib stdenv.cc.cc)
curl
];
installPhase = ''
# codeql directory should not be top-level, otherwise,
# it'll include /nix/store to resolve extractors.
mkdir -p $out/{codeql,bin}
cp -R * $out/codeql/
ln -sf $out/codeql/tools/linux64/lib64trace.so $out/codeql/tools/linux64/libtrace.so
# many of the codeql extractors use CODEQL_DIST + CODEQL_PLATFORM to
# resolve java home, so to be able to create databases, we want to make
# sure that they point somewhere sane/usable since we can not autopatch
# the codeql packaged java dist, but we DO want to patch the extractors
# as well as the builders which are ELF binaries for the most part
rm -rf $out/codeql/tools/linux64/java
ln -s ${jdk17} $out/codeql/tools/linux64/java
ln -s $out/codeql/codeql $out/bin/
'';
meta = with lib; {
description = "Semantic code analysis engine";
homepage = "https://codeql.github.com";
maintainers = [ maintainers.dump_stack ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
license = licenses.unfree;
};
}

View File

@@ -0,0 +1,117 @@
{
lib,
channel ? "stable",
fetchurl,
installShellFiles,
makeBinaryWrapper,
terraform,
stdenvNoCC,
unzip,
nixosTests,
}:
let
inherit (stdenvNoCC.hostPlatform) system;
channels = {
stable = {
version = "2.23.4";
hash = {
x86_64-linux = "sha256-tpU26+3NrfOUWgd4Wav1fhTMtErh2CXt3Nr8BTIUdbc=";
x86_64-darwin = "sha256-07pSXm++a9VWcnc4AgrR7OaaDw2ki2XMtr8PZkWW2Vw=";
aarch64-linux = "sha256-Rm1CIVK7qPLizK+0H3Eb2qwPEj1TjHtIqdBr+Z+21eA=";
aarch64-darwin = "sha256-H5MLnRokC5Wb3FrotprunG+kx0qwT8/Ou6ScO7N2h+E=";
};
};
mainline = {
version = "2.24.2";
hash = {
x86_64-linux = "sha256-Al3bvIsSnU0vdNAkZknpP/rxJIP6UGUIeIZ6kw84SuM=";
x86_64-darwin = "sha256-0+n69BWKIgKFUCQzW4AMRW4QdRQcZkK5Ioiu4d4RvnE=";
aarch64-linux = "sha256-2JkEO7hhLY9e22OTYLhzv+Zb0aP6PRVG8ZX5r686o0Q=";
aarch64-darwin = "sha256-7CJQEj7VA3SwaZeimng6BPDtw14LXt7+1E7HxVs8kYM=";
};
};
};
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coder";
version = channels.${channel}.version;
src = fetchurl {
hash = (channels.${channel}.hash).${system};
url =
let
systemName =
{
x86_64-linux = "linux_amd64";
aarch64-linux = "linux_arm64";
x86_64-darwin = "darwin_amd64";
aarch64-darwin = "darwin_arm64";
}
.${system};
ext =
{
x86_64-linux = "tar.gz";
aarch64-linux = "tar.gz";
x86_64-darwin = "zip";
aarch64-darwin = "zip";
}
.${system};
in
"https://github.com/coder/coder/releases/download/v${finalAttrs.version}/coder_${finalAttrs.version}_${systemName}.${ext}";
};
nativeBuildInputs = [
installShellFiles
makeBinaryWrapper
unzip
];
unpackPhase = ''
runHook preUnpack
case $src in
*.tar.gz) tar -xz -f "$src" ;;
*.zip) unzip "$src" ;;
esac
runHook postUnpack
'';
installPhase = ''
runHook preInstall
install -D -m755 coder $out/bin/coder
runHook postInstall
'';
postInstall = ''
wrapProgram $out/bin/coder \
--prefix PATH : ${lib.makeBinPath [ terraform ]}
'';
# integration tests require network access
doCheck = false;
meta = {
description = "Provision remote development environments via Terraform";
homepage = "https://coder.com";
license = lib.licenses.agpl3Only;
mainProgram = "coder";
maintainers = with lib.maintainers; [
ghuntley
kylecarbs
urandom
];
};
passthru = {
updateScript = ./update.sh;
tests = {
inherit (nixosTests) coder;
};
};
})

48
pkgs/by-name/co/coder/update.sh Executable file
View File

@@ -0,0 +1,48 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eu -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
# The released tagged as "latest" is always stable.
LATEST_STABLE_VERSION=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} --fail -sSL https://api.github.com/repos/coder/coder/releases/latest | jq -r '.tag_name | sub("^v"; "")')
# The highest version that is not a pre-release is the latest mainline version.
LATEST_MAINLINE_VERSION=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} --fail -sSL https://api.github.com/repos/coder/coder/releases | jq -r 'map(select(.prerelease == false)) | sort_by(.tag_name | sub("^v"; "") | split(".") | map(tonumber)) | .[-1].tag_name | sub("^v"; "")')
# Define the platforms
declare -A ARCHS=(["x86_64-linux"]="linux_amd64.tar.gz"
["aarch64-linux"]="linux_arm64.tar.gz"
["x86_64-darwin"]="darwin_amd64.zip"
["aarch64-darwin"]="darwin_arm64.zip")
update_version_and_hashes() {
local version=$1
local channel=$2
# Update version number, using '#' as delimiter
sed -i "/${channel} = {/,/};/{
s#^\(\s*\)version = .*#\1version = \"$version\";#
}" ./package.nix
# Update hashes for each architecture
for ARCH in "${!ARCHS[@]}"; do
local URL="https://github.com/coder/coder/releases/download/v${version}/coder_${version}_${ARCHS[$ARCH]}"
echo "Fetching hash for $channel/$ARCH..."
# Fetch the new hash using nix-prefetch-url
local NEW_HASH=$(nix-prefetch-url --type sha256 $URL)
local SRI_HASH=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $NEW_HASH)
# Update the Nix file with the new hash, using '#' as delimiter and preserving indentation
sed -i "/${channel} = {/,/};/{
s#^\(\s*\)${ARCH} = .*#\1${ARCH} = \"${SRI_HASH}\";#
}" ./package.nix
done
}
# Update stable channel
update_version_and_hashes $LATEST_STABLE_VERSION "stable"
# Update mainline channel
update_version_and_hashes $LATEST_MAINLINE_VERSION "mainline"

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "codesearch";
version = "1.2.0";
src = fetchFromGitHub {
owner = "google";
repo = "codesearch";
rev = "v${version}";
sha256 = "sha256-i03w8PZ31j5EutUZaamZsHz+z4qgX4prePbj5DLA78s=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Fast, indexed regexp search over large file trees";
homepage = "https://github.com/google/codesearch";
license = [ licenses.bsd3 ];
maintainers = with maintainers; [ bennofs ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "codesnap";
version = "0.10.9";
src = fetchFromGitHub {
owner = "mistricky";
repo = "CodeSnap";
tag = "v${version}";
hash = "sha256-EtMEUtLSgYrb0izPPCh432uX2p/8Ykf2caAR+8ZdxhU=";
};
cargoHash = "sha256-atvSygt1Xi+rPxcJb0zdRBnL6SpSkyCcGxs1z2hWXGA=";
cargoBuildFlags = [
"-p"
"codesnap-cli"
];
cargoTestFlags = cargoBuildFlags;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Command-line tool for generating beautiful code snippets";
homepage = "https://github.com/mistricky/CodeSnap";
changelog = "https://github.com/mistricky/CodeSnap/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nartsiss ];
mainProgram = "codesnap";
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
fetchFromGitHub,
aspellDicts,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "codespell";
version = "2.4.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "codespell-project";
repo = "codespell";
tag = "v${version}";
sha256 = "sha256-9hr/QZcBESLukujzNKNjWGG3nXx+wkvQvoUYmYgtXv0=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools-scm
];
nativeCheckInputs = with python3.pkgs; [
aspell-python
chardet
pytestCheckHook
pytest-cov-stub
pytest-dependency
];
preCheck = ''
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
'';
disabledTests = [
# tries to run not fully installed script
"test_basic"
];
pythonImportsCheck = [ "codespell_lib" ];
meta = with lib; {
description = "Fix common misspellings in source code";
mainProgram = "codespell";
homepage = "https://github.com/codespell-project/codespell";
license = with licenses; [
gpl2Only
cc-by-sa-30
];
maintainers = with maintainers; [
johnazoidberg
SuperSandro2000
];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "codespelunker";
version = "1.4.0";
src = fetchFromGitHub {
owner = "boyter";
repo = "cs";
rev = "v${version}";
hash = "sha256-FZf3aRozpXWTRDrNDRxb1dGBXiLVEYOUd8a/hqzThps=";
};
vendorHash = null;
subPackages = [ "." ];
meta = with lib; {
description = "Command code search tool";
homepage = "https://github.com/boyter/cs";
license = with licenses; [
mit
unlicense
];
maintainers = with maintainers; [ viraptor ];
mainProgram = "cs";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
oniguruma,
}:
rustPlatform.buildRustPackage rec {
pname = "codevis";
version = "0.8.4";
src = fetchFromGitHub {
owner = "sloganking";
repo = "codevis";
rev = "v${version}";
hash = "sha256-LZ6NsoyEPUvgcVdbG7U2Vzuz/TLLraScvW97PocUNpU=";
};
cargoHash = "sha256-BIUzuV7q/5GSAmjRfdL71dWC7TjBVaSL8UyWpTF2AxM=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
oniguruma
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
};
meta = with lib; {
description = "Tool to take all source code in a folder and render them to one image";
homepage = "https://github.com/sloganking/codevis";
changelog = "https://github.com/sloganking/codevis/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "codevis";
};
}

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
makeBinaryWrapper,
nix-update-script,
pkg-config,
openssl,
ripgrep,
versionCheckHook,
installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "codex";
version = "0.46.0";
src = fetchFromGitHub {
owner = "openai";
repo = "codex";
tag = "rust-v${finalAttrs.version}";
hash = "sha256-o898VjjPKevr1VRlRhJUNWsrHEGEn7jkdzWBj+DpbCs=";
};
sourceRoot = "${finalAttrs.src.name}/codex-rs";
cargoHash = "sha256-Qp5zezXjVdOp8OylLgUZRLc0HQlgII6nOZodnOrok6U=";
nativeBuildInputs = [
installShellFiles
makeBinaryWrapper
pkg-config
];
buildInputs = [ openssl ];
# NOTE: part of the test suite requires access to networking, local shells,
# apple system configuration, etc. since this is a very fast moving target
# (for now), with releases happening every other day, constantly figuring out
# which tests need to be skipped, or finding workarounds, was too burdensome,
# and in practice not adding any real value. this decision may be reversed in
# the future once this software stabilizes.
doCheck = false;
postInstall = lib.optionalString installShellCompletions ''
installShellCompletion --cmd codex \
--bash <($out/bin/codex completion bash) \
--fish <($out/bin/codex completion fish) \
--zsh <($out/bin/codex completion zsh)
'';
postFixup = ''
wrapProgram $out/bin/codex --prefix PATH : ${lib.makeBinPath [ ripgrep ]}
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru = {
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^rust-v(\\d+\\.\\d+\\.\\d+)$"
];
};
};
meta = {
description = "Lightweight coding agent that runs in your terminal";
homepage = "https://github.com/openai/codex";
changelog = "https://raw.githubusercontent.com/openai/codex/refs/tags/rust-v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.asl20;
mainProgram = "codex";
maintainers = with lib.maintainers; [
malo
delafthi
];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
cmake,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "codipack";
version = "3.0.0";
src = fetchFromGitHub {
owner = "SciCompKL";
repo = "CoDiPack";
tag = "v${finalAttrs.version}";
hash = "sha256-dGzLPU8YOrBdXPwUnEElqfxzbUdkAQxtv2+7+itNsyI=";
};
nativeBuildInputs = [
cmake
pkg-config
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Fast gradient evaluation in C++ based on Expression Templates";
homepage = "https://scicomp.rptu.de/software/codi/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
athas
];
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
appimageTools,
fetchurl,
}:
let
pname = "codux";
version = "15.42.0";
src = fetchurl {
url = "https://github.com/wixplosives/codux-versions/releases/download/${version}/Codux-${version}.x86_64.AppImage";
hash = "sha256-rD0yXZAEUcPtxWlWuZD77gjw6JlcUvBsaDYGj+NgLss=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/codux.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
substituteInPlace $out/share/applications/codux.desktop --replace 'Exec=AppRun' 'Exec=codux'
'';
meta = {
description = "Visual IDE for React";
homepage = "https://www.codux.com";
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [
dit7ya
kashw2
];
mainProgram = "codux";
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "coercer";
version = "2.4.3";
pyproject = true;
src = fetchFromGitHub {
owner = "p0dalirius";
repo = "Coercer";
tag = version;
hash = "sha256-WeaKToKYIB+jjTNIQvAUQQNb25TsNWALYZwIZuBjkPE=";
};
pythonRelaxDeps = [ "impacket" ];
build-system = with python3.pkgs; [ poetry-core ];
dependencies = with python3.pkgs; [
impacket
xlsxwriter
];
pythonImportsCheck = [ "coercer" ];
# this file runs into issues on case-insensitive filesystems
# ValueError: Both <...>/coercer and <...>/coercer.py exist
postPatch = ''
rm Coercer.py
'';
meta = {
description = "Tool to automatically coerce a Windows server";
homepage = "https://github.com/p0dalirius/Coercer";
changelog = "https://github.com/p0dalirius/Coercer/releases/tag/${version}";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "coercer";
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitLab,
ninja,
pkg-config,
meson,
libevent,
curl,
spdlog,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "coeurl";
version = "0.3.1";
src = fetchFromGitLab {
domain = "nheko.im";
owner = "nheko-reborn";
repo = "coeurl";
tag = "v${finalAttrs.version}";
hash = "sha256-NGplM5c/dMGSQbhKeuPOTWL8KsqvMd/76YuwCxnqNNE=";
};
postPatch = ''
substituteInPlace subprojects/curl.wrap --replace '[provides]' '[provide]'
'';
nativeBuildInputs = [
ninja
pkg-config
meson
];
buildInputs = [
libevent
curl
spdlog
];
meta = {
description = "Simple async wrapper around CURL for C++";
homepage = "https://nheko.im/nheko-reborn/coeurl";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ rnhmjoj ];
};
})

View File

@@ -0,0 +1,48 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication {
pname = "coffeegrindsize";
# no tags in the repo
version = "0-unstable-2021-04-20";
format = "other";
src = fetchFromGitHub {
owner = "jgagneastro";
repo = "coffeegrindsize";
rev = "22661ebd21831dba4cf32bfc6ba59fe3d49f879c";
hash = "sha256-HlTw0nmr+VZL6EUX9RJzj253fnAred9LNFNgVHqoAoI=";
};
propagatedBuildInputs = with python3.pkgs; [
tkinter
matplotlib
numpy
pandas
pillow
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
echo "#!/usr/bin/env python" > "$out/bin/coffeegrindsize"
cat coffeegrindsize.py >> "$out/bin/coffeegrindsize"
chmod +x "$out/bin/coffeegrindsize"
patchShebangs "$out/bin/coffeegrindsize"
runHook postInstall
'';
meta = {
description = "Detects the individual coffee grounds in a white-background picture to determine particle size distribution";
mainProgram = "coffeegrindsize";
homepage = "https://github.com/jgagneastro/coffeegrindsize";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ t4ccer ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "coffeescript";
version = "2.7.0";
src = fetchFromGitHub {
owner = "jashkenas";
repo = "coffeescript";
tag = version;
hash = "sha256-vr46LKICX61rFPCkZ3G+8gJykg+MO43YRJnZGM3RoY0=";
};
npmDepsHash = "sha256-mCm31OwI3wjq8taKRQuEj4+IWVZO9Z5KuIDBf39lYoQ=";
env = {
PUPPETEER_SKIP_DOWNLOAD = true;
};
dontNpmBuild = true;
meta = {
description = "Little language that compiles into JavaScript";
homepage = "https://github.com/jashkenas/coffeescript";
license = lib.licenses.mit;
mainProgram = "coffee";
maintainers = with lib.maintainers; [ cdmistman ];
};
}

View File

@@ -0,0 +1,77 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
pkg-config,
wayland,
wayland-protocols,
libwpe,
libwpe-fdo,
glib-networking,
webkitgtk_4_0,
makeWrapper,
wrapGAppsHook3,
adwaita-icon-theme,
gdk-pixbuf,
}:
stdenv.mkDerivation rec {
pname = "cog";
version = "0.8.1";
src = fetchFromGitHub {
owner = "igalia";
repo = "cog";
rev = "v${version}";
sha256 = "sha256-eF7rvOjZntcMmn622342yqfp4ksZ6R/FFBT36bYCViE=";
};
buildInputs = [
wayland-protocols
wayland
libwpe
libwpe-fdo
webkitgtk_4_0
glib-networking
gdk-pixbuf
adwaita-icon-theme
];
nativeBuildInputs = [
cmake
pkg-config
wayland
makeWrapper
wrapGAppsHook3
];
depsBuildsBuild = [
pkg-config
];
cmakeFlags = [
"-DCOG_USE_WEBKITGTK=ON"
];
# https://github.com/Igalia/cog/issues/438
postPatch = ''
substituteInPlace core/cogcore.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
# not ideal, see https://github.com/WebPlatformForEmbedded/libwpe/issues/59
preFixup = ''
wrapProgram $out/bin/cog \
--prefix LD_LIBRARY_PATH : ${libwpe-fdo}/lib
'';
meta = with lib; {
description = "Small single window launcher for the WebKit WPE port";
homepage = "https://github.com/Igalia/cog";
mainProgram = "cog";
license = licenses.mit;
maintainers = [ maintainers.matthewbauer ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,147 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
libGL,
glib,
gdk-pixbuf,
xorg,
libintl,
pangoSupport ? true,
pango,
cairo,
gobject-introspection,
wayland,
gnome,
libgbm,
mesa-gl-headers,
automake,
autoconf,
gstreamerSupport ? false,
gst_all_1,
harfbuzz,
}:
stdenv.mkDerivation rec {
pname = "cogl";
version = "1.22.8";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/cogl-${version}.tar.xz";
sha256 = "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8";
};
patches = [
# Some deepin packages need the following patches. They have been
# submitted by Fedora on the GNOME Bugzilla
# (https://bugzilla.gnome.org/787443). Upstream thinks the patch
# could be merged, but dev can not make a new release.
./patches/gnome_bugzilla_787443_359589_deepin.patch
./patches/gnome_bugzilla_787443_361056_deepin.patch
];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
pkg-config
libintl
automake
autoconf
gobject-introspection
];
configureFlags = [
"--enable-introspection"
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
"--enable-kms-egl-platform"
"--enable-wayland-egl-platform"
"--enable-wayland-egl-server"
"--enable-gles1"
"--enable-gles2"
# Force linking against libGL.
# Otherwise, it tries to load it from the runtime library path.
"LIBS=-lGL"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"--disable-glx"
"--without-x"
]
++ lib.optionals gstreamerSupport [
"--enable-cogl-gst"
];
# TODO: this shouldn't propagate so many things
# especially not gobject-introspection
propagatedBuildInputs = [
glib
gdk-pixbuf
gobject-introspection
]
++ lib.optionals stdenv.hostPlatform.isLinux [
wayland
libgbm
mesa-gl-headers
libGL
xorg.libXrandr
xorg.libXfixes
xorg.libXcomposite
xorg.libXdamage
]
++ lib.optionals gstreamerSupport [
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
];
buildInputs = lib.optionals pangoSupport [
pango
cairo
harfbuzz
];
env = {
COGL_PANGO_DEP_CFLAGS = toString (
lib.optionals (stdenv.hostPlatform.isDarwin && pangoSupport) [
"-I${pango.dev}/include/pango-1.0"
"-I${cairo.dev}/include/cairo"
"-I${harfbuzz.dev}/include/harfbuzz"
]
);
}
// lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
#doCheck = true; # all tests fail (no idea why)
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "odd-unstable";
};
};
meta = with lib; {
description = "Small open source library for using 3D graphics hardware for rendering";
maintainers = with maintainers; [ lovek323 ];
longDescription = ''
Cogl is a small open source library for using 3D graphics hardware for
rendering. The API departs from the flat state machine style of OpenGL
and is designed to make it easy to write orthogonal components that can
render without stepping on each other's toes.
'';
platforms = platforms.unix;
license = with licenses; [
mit
bsd3
publicDomain
sgi-b-20
];
};
}

View File

@@ -0,0 +1,93 @@
From 78636289b073d67209a20145ef0dc003f2d77db6 Mon Sep 17 00:00:00 2001
From: Sian Cao <yinshuiboy@gmail.com>
Date: Tue, 12 Apr 2016 11:36:51 +0800
Subject: [PATCH 1/2] Add GL_ARB_shader_texture_lod support
The patch is used to do lod biased texturing. I can achieve
faster blurring of images instead of using large blur radius.
---
cogl/cogl-context.h | 1 +
cogl/cogl-glsl-shader.c | 13 +++++++++++--
cogl/cogl-types.h | 3 ++-
cogl/driver/gl/gl/cogl-driver-gl.c | 7 +++++++
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h
index 07badeb..261ce49 100644
--- a/cogl/cogl-context.h
+++ b/cogl/cogl-context.h
@@ -290,6 +290,7 @@ typedef enum _CoglFeatureID
COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE,
COGL_FEATURE_ID_TEXTURE_RG,
COGL_FEATURE_ID_BUFFER_AGE,
+ COGL_FEATURE_ID_SHADER_TEXTURE_LOD,
/*< private >*/
_COGL_N_FEATURE_IDS /*< skip >*/
diff --git a/cogl/cogl-glsl-shader.c b/cogl/cogl-glsl-shader.c
index 196e0c7..4fb0eb5 100644
--- a/cogl/cogl-glsl-shader.c
+++ b/cogl/cogl-glsl-shader.c
@@ -87,8 +87,8 @@ _cogl_glsl_shader_set_source_with_boilerplate (CoglContext *ctx,
const char *vertex_boilerplate;
const char *fragment_boilerplate;
- const char **strings = g_alloca (sizeof (char *) * (count_in + 4));
- GLint *lengths = g_alloca (sizeof (GLint) * (count_in + 4));
+ const char **strings = g_alloca (sizeof (char *) * (count_in + 5));
+ GLint *lengths = g_alloca (sizeof (GLint) * (count_in + 5));
char *version_string;
int count = 0;
@@ -111,6 +111,15 @@ _cogl_glsl_shader_set_source_with_boilerplate (CoglContext *ctx,
lengths[count++] = sizeof (texture_3d_extension) - 1;
}
+ if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE) &&
+ cogl_has_feature (ctx, COGL_FEATURE_ID_SHADER_TEXTURE_LOD))
+ {
+ static const char shader_texture_lod_ext[] =
+ "#extension GL_ARB_shader_texture_lod : enable\n";
+ strings[count] = shader_texture_lod_ext;
+ lengths[count++] = sizeof (shader_texture_lod_ext) - 1;
+ }
+
if (shader_gl_type == GL_VERTEX_SHADER)
{
strings[count] = vertex_boilerplate;
diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
index 6accf8d..77964c6 100644
--- a/cogl/cogl-types.h
+++ b/cogl/cogl-types.h
@@ -470,7 +470,8 @@ typedef enum
COGL_FEATURE_MAP_BUFFER_FOR_READ = (1 << 21),
COGL_FEATURE_MAP_BUFFER_FOR_WRITE = (1 << 22),
COGL_FEATURE_ONSCREEN_MULTIPLE = (1 << 23),
- COGL_FEATURE_DEPTH_TEXTURE = (1 << 24)
+ COGL_FEATURE_DEPTH_TEXTURE = (1 << 24),
+ COGL_FEATURE_SHADER_TEXTURE_LOD = (1 << 25)
} CoglFeatureFlags;
/**
diff --git a/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/driver/gl/gl/cogl-driver-gl.c
index 716d1dd..f305b6a 100644
--- a/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -568,6 +568,13 @@ _cogl_driver_update_features (CoglContext *ctx,
COGL_FEATURE_ID_TEXTURE_RECTANGLE, TRUE);
}
+ if (_cogl_check_extension ("GL_ARB_shader_texture_lod", gl_extensions))
+ {
+ flags |= COGL_FEATURE_SHADER_TEXTURE_LOD;
+ COGL_FLAGS_SET (ctx->features,
+ COGL_FEATURE_ID_SHADER_TEXTURE_LOD, TRUE);
+ }
+
if (ctx->glTexImage3D)
{
flags |= COGL_FEATURE_TEXTURE_3D;
--
2.9.5

View File

@@ -0,0 +1,368 @@
From d8b34ab0604d80d0be22b8b78e9aa6bf4fac7db0 Mon Sep 17 00:00:00 2001
From: Sian Cao <yinshuiboy@gmail.com>
Date: Thu, 27 Oct 2016 15:19:32 +0800
Subject: [PATCH 2/2] texture: Support copy_sub_image
We need copy_sub_image to implement blurring effects of partial framebuffer
contents as texture sources.
---
cogl/cogl-atlas-texture.c | 1 +
cogl/cogl-driver.h | 10 ++++++++
cogl/cogl-sub-texture.c | 1 +
cogl/cogl-texture-2d-sliced.c | 1 +
cogl/cogl-texture-2d.c | 30 ++++++++++++++++++++++
cogl/cogl-texture-3d.c | 1 +
cogl/cogl-texture-private.h | 9 +++++++
cogl/cogl-texture-rectangle.c | 1 +
cogl/cogl-texture.c | 33 ++++++++++++++++++++++++
cogl/cogl-texture.h | 9 +++++++
cogl/driver/gl/cogl-texture-2d-gl-private.h | 9 +++++++
cogl/driver/gl/cogl-texture-2d-gl.c | 39 +++++++++++++++++++++++++++++
cogl/driver/gl/gl/cogl-driver-gl.c | 1 +
cogl/driver/gl/gles/cogl-driver-gles.c | 1 +
cogl/driver/nop/cogl-driver-nop.c | 1 +
cogl/winsys/cogl-texture-pixmap-x11.c | 1 +
16 files changed, 148 insertions(+)
diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c
index 1c8b569..e411302 100644
--- a/cogl/cogl-atlas-texture.c
+++ b/cogl/cogl-atlas-texture.c
@@ -1027,6 +1027,7 @@ cogl_atlas_texture_vtable =
FALSE, /* not primitive */
_cogl_atlas_texture_allocate,
_cogl_atlas_texture_set_region,
+ NULL, /* copy_sub_image */
NULL, /* get_data */
_cogl_atlas_texture_foreach_sub_texture_in_region,
_cogl_atlas_texture_get_max_waste,
diff --git a/cogl/cogl-driver.h b/cogl/cogl-driver.h
index 648228c..4a0aeaf 100644
--- a/cogl/cogl-driver.h
+++ b/cogl/cogl-driver.h
@@ -192,6 +192,16 @@ struct _CoglDriverVtable
int level,
CoglError **error);
+ CoglBool
+ (* texture_2d_copy_sub_image) (CoglTexture2D *tex_2d,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ CoglError **error);
+
/* Reads back the full contents of the given texture and write it to
* @data in the given @format and with the given @rowstride.
*
diff --git a/cogl/cogl-sub-texture.c b/cogl/cogl-sub-texture.c
index 7baf95e..0a16193 100644
--- a/cogl/cogl-sub-texture.c
+++ b/cogl/cogl-sub-texture.c
@@ -460,6 +460,7 @@ cogl_sub_texture_vtable =
FALSE, /* not primitive */
_cogl_sub_texture_allocate,
_cogl_sub_texture_set_region,
+ NULL, /* copy_sub_image */
NULL, /* get_data */
_cogl_sub_texture_foreach_sub_texture_in_region,
_cogl_sub_texture_get_max_waste,
diff --git a/cogl/cogl-texture-2d-sliced.c b/cogl/cogl-texture-2d-sliced.c
index e76bef6..b0b099f 100644
--- a/cogl/cogl-texture-2d-sliced.c
+++ b/cogl/cogl-texture-2d-sliced.c
@@ -1526,6 +1526,7 @@ cogl_texture_2d_sliced_vtable =
FALSE, /* not primitive */
_cogl_texture_2d_sliced_allocate,
_cogl_texture_2d_sliced_set_region,
+ NULL, /* copy_sub_image */
NULL, /* get_data */
_cogl_texture_2d_sliced_foreach_sub_texture_in_region,
_cogl_texture_2d_sliced_get_max_waste,
diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
index cc28cd9..d9ab188 100644
--- a/cogl/cogl-texture-2d.c
+++ b/cogl/cogl-texture-2d.c
@@ -628,6 +628,35 @@ _cogl_texture_2d_set_region (CoglTexture *tex,
}
static CoglBool
+_cogl_texture_2d_copy_sub_image (CoglTexture *tex,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ CoglError **error)
+{
+ CoglContext *ctx = tex->context;
+ CoglTexture2D *tex_2d = COGL_TEXTURE_2D (tex);
+
+ cogl_texture_allocate (tex, NULL); /* (abort on error) */
+
+ ctx->driver_vtable->texture_2d_copy_sub_image (tex_2d,
+ xoffset,
+ yoffset,
+ x,
+ y,
+ width,
+ height,
+ error);
+
+ tex_2d->mipmaps_dirty = TRUE;
+
+ return TRUE;
+}
+
+static CoglBool
_cogl_texture_2d_get_data (CoglTexture *tex,
CoglPixelFormat format,
int rowstride,
@@ -675,6 +704,7 @@ cogl_texture_2d_vtable =
TRUE, /* primitive */
_cogl_texture_2d_allocate,
_cogl_texture_2d_set_region,
+ _cogl_texture_2d_copy_sub_image,
_cogl_texture_2d_get_data,
NULL, /* foreach_sub_texture_in_region */
_cogl_texture_2d_get_max_waste,
diff --git a/cogl/cogl-texture-3d.c b/cogl/cogl-texture-3d.c
index 8e2ff08..a59d386 100644
--- a/cogl/cogl-texture-3d.c
+++ b/cogl/cogl-texture-3d.c
@@ -741,6 +741,7 @@ cogl_texture_3d_vtable =
TRUE, /* primitive */
_cogl_texture_3d_allocate,
_cogl_texture_3d_set_region,
+ NULL, /* copy_sub_image */
_cogl_texture_3d_get_data,
NULL, /* foreach_sub_texture_in_region */
_cogl_texture_3d_get_max_waste,
diff --git a/cogl/cogl-texture-private.h b/cogl/cogl-texture-private.h
index 472c41d..34ff81c 100644
--- a/cogl/cogl-texture-private.h
+++ b/cogl/cogl-texture-private.h
@@ -90,6 +90,15 @@ struct _CoglTextureVtable
CoglBitmap *bitmap,
CoglError **error);
+ CoglBool (* copy_sub_image) (CoglTexture *texture,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ CoglError **error);
+
/* This should copy the image data of the texture into @data. The
requested format will have been first passed through
ctx->texture_driver->find_best_gl_get_data_format so it should
diff --git a/cogl/cogl-texture-rectangle.c b/cogl/cogl-texture-rectangle.c
index 65d2f06..9f533c9 100644
--- a/cogl/cogl-texture-rectangle.c
+++ b/cogl/cogl-texture-rectangle.c
@@ -761,6 +761,7 @@ cogl_texture_rectangle_vtable =
TRUE, /* primitive */
_cogl_texture_rectangle_allocate,
_cogl_texture_rectangle_set_region,
+ NULL, /* copy_sub_image */
_cogl_texture_rectangle_get_data,
NULL, /* foreach_sub_texture_in_region */
_cogl_texture_rectangle_get_max_waste,
diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
index d93db22..1f4b43c 100644
--- a/cogl/cogl-texture.c
+++ b/cogl/cogl-texture.c
@@ -514,6 +514,39 @@ cogl_texture_set_region (CoglTexture *texture,
}
CoglBool
+cogl_texture_copy_sub_image (CoglTexture *texture,
+ int xoffset,
+ int yoffset,
+ int x,
+ int y,
+ size_t width,
+ size_t height)
+{
+ CoglError *ignore_error = NULL;
+ CoglBool status;
+
+ if (!texture->allocated)
+ cogl_texture_allocate (texture, NULL);
+
+ if (!texture->vtable->copy_sub_image)
+ return FALSE;
+
+ status = texture->vtable->copy_sub_image (texture,
+ xoffset,
+ yoffset,
+ x,
+ y,
+ width,
+ height,
+ &ignore_error);
+
+ if (!status)
+ cogl_error_free (ignore_error);
+ return status;
+}
+
+
+CoglBool
cogl_texture_set_data (CoglTexture *texture,
CoglPixelFormat format,
int rowstride,
diff --git a/cogl/cogl-texture.h b/cogl/cogl-texture.h
index 2718830..81657d1 100644
--- a/cogl/cogl-texture.h
+++ b/cogl/cogl-texture.h
@@ -399,6 +399,15 @@ cogl_texture_set_region (CoglTexture *texture,
unsigned int rowstride,
const uint8_t *data);
+CoglBool
+cogl_texture_copy_sub_image (CoglTexture *texture,
+ int xoffset,
+ int yoffset,
+ int x,
+ int y,
+ size_t width,
+ size_t height);
+
#if defined (COGL_ENABLE_EXPERIMENTAL_API)
/**
diff --git a/cogl/driver/gl/cogl-texture-2d-gl-private.h b/cogl/driver/gl/cogl-texture-2d-gl-private.h
index e5c6585..d2f9985 100644
--- a/cogl/driver/gl/cogl-texture-2d-gl-private.h
+++ b/cogl/driver/gl/cogl-texture-2d-gl-private.h
@@ -109,6 +109,15 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
int dst_y,
int level,
CoglError **error);
+CoglBool
+_cogl_texture_2d_gl_copy_sub_image (CoglTexture2D *tex_2d,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ CoglError **error);
void
_cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
diff --git a/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/driver/gl/cogl-texture-2d-gl.c
index 8675f52..bc15ac5 100644
--- a/cogl/driver/gl/cogl-texture-2d-gl.c
+++ b/cogl/driver/gl/cogl-texture-2d-gl.c
@@ -35,6 +35,7 @@
#include <config.h>
#include <string.h>
+#include <stdio.h>
#include "cogl-private.h"
#include "cogl-texture-private.h"
@@ -719,6 +720,44 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
return status;
}
+CoglBool
+_cogl_texture_2d_gl_copy_sub_image (CoglTexture2D *tex_2d,
+ GLint xoffset,
+ GLint yoffset,
+ GLint x,
+ GLint y,
+ GLsizei width,
+ GLsizei height,
+ CoglError **error)
+{
+ CoglContext *ctx = COGL_TEXTURE (tex_2d)->context;
+
+ if (ctx->current_read_buffer == NULL)
+ return FALSE;
+
+ if (ctx->current_draw_buffer)
+ _cogl_framebuffer_flush_journal (ctx->current_draw_buffer);
+
+ if (ctx->current_read_buffer != NULL &&
+ ctx->current_read_buffer != ctx->current_draw_buffer)
+ _cogl_framebuffer_flush_journal (ctx->current_read_buffer);
+
+ _cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
+ tex_2d->gl_texture,
+ tex_2d->is_foreign);
+
+ ctx->glCopyTexSubImage2D (GL_TEXTURE_2D,
+ 0,
+ xoffset,
+ yoffset,
+ x,
+ y,
+ width,
+ height);
+
+ return TRUE;
+}
+
void
_cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
CoglPixelFormat format,
diff --git a/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/driver/gl/gl/cogl-driver-gl.c
index f305b6a..f7f5020 100644
--- a/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -695,6 +695,7 @@ _cogl_driver_gl =
_cogl_texture_2d_gl_get_gl_handle,
_cogl_texture_2d_gl_generate_mipmap,
_cogl_texture_2d_gl_copy_from_bitmap,
+ _cogl_texture_2d_gl_copy_sub_image,
_cogl_texture_2d_gl_get_data,
_cogl_gl_flush_attributes_state,
_cogl_clip_stack_gl_flush,
diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
index e94449f..f5ac771 100644
--- a/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -476,6 +476,7 @@ _cogl_driver_gles =
_cogl_texture_2d_gl_get_gl_handle,
_cogl_texture_2d_gl_generate_mipmap,
_cogl_texture_2d_gl_copy_from_bitmap,
+ _cogl_texture_2d_gl_copy_sub_image,
NULL, /* texture_2d_get_data */
_cogl_gl_flush_attributes_state,
_cogl_clip_stack_gl_flush,
diff --git a/cogl/driver/nop/cogl-driver-nop.c b/cogl/driver/nop/cogl-driver-nop.c
index 53f5975..9d88955 100644
--- a/cogl/driver/nop/cogl-driver-nop.c
+++ b/cogl/driver/nop/cogl-driver-nop.c
@@ -80,6 +80,7 @@ _cogl_driver_nop =
_cogl_texture_2d_nop_get_gl_handle,
_cogl_texture_2d_nop_generate_mipmap,
_cogl_texture_2d_nop_copy_from_bitmap,
+ NULL, /* texture_2d_copy_from_image */
NULL, /* texture_2d_get_data */
_cogl_nop_flush_attributes_state,
_cogl_clip_stack_nop_flush,
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c
index 398c357..a44cdaf 100644
--- a/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -1164,6 +1164,7 @@ cogl_texture_pixmap_x11_vtable =
FALSE, /* not primitive */
_cogl_texture_pixmap_x11_allocate,
_cogl_texture_pixmap_x11_set_region,
+ NULL, /* copy_sub_image */
_cogl_texture_pixmap_x11_get_data,
_cogl_texture_pixmap_x11_foreach_sub_texture_in_region,
_cogl_texture_pixmap_x11_get_max_waste,
--
2.9.5

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
}:
stdenv.mkDerivation rec {
version = "2.11.10";
pname = "coinutils";
src = fetchFromGitHub {
owner = "coin-or";
repo = "CoinUtils";
rev = "releases/${version}";
hash = "sha256-Rbm45HRbRKQ6Cdup+gvKJ1xkK1HKG3irR5AIjhLer7g=";
};
patches = [
(fetchpatch {
url = "https://github.com/coin-or/CoinUtils/commit/1700ed92c2bc1562aabe65dee3b4885bd5c87fb9.patch";
stripLen = 1;
extraPrefix = "CoinUtils/";
hash = "sha256-8S6XteZvoJlL+5MWiOrW7HXsdcnzpuEFTyzX9qg7OUY=";
})
];
doCheck = true;
meta = with lib; {
license = licenses.epl20;
homepage = "https://github.com/coin-or/CoinUtils";
description = "Collection of classes and helper functions that are generally useful to multiple COIN-OR projects";
maintainers = with maintainers; [ tmarkus ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
boost,
cmake,
libGL,
libGLU,
libX11,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "coin";
version = "4.0.5";
src = fetchFromGitHub {
owner = "coin3d";
repo = "coin";
rev = "v${finalAttrs.version}";
hash = "sha256-2lfy33Qx0AjKDfwwRn7hjaz7mPQsr7MRB9v75qshGjM=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
boost
libGL
libGLU
]
++ lib.optional stdenv.hostPlatform.isLinux libX11;
cmakeFlags = [ "-DCOIN_USE_CPACK=OFF" ];
meta = with lib; {
homepage = "https://github.com/coin3d/coin";
description = "High-level, retained-mode toolkit for effective 3D graphics development";
mainProgram = "coin-config";
license = licenses.bsd3;
maintainers = [ ];
platforms = platforms.linux ++ platforms.darwin;
};
})

View File

@@ -0,0 +1,46 @@
{
lib,
fetchFromGitHub,
openssl,
pkg-config,
rustPlatform,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "coinlive";
version = "0.2.2";
src = fetchFromGitHub {
owner = "mayeranalytics";
repo = "coinlive";
tag = "v${version}";
hash = "sha256-llw97jjfPsDd4nYi6lb9ug6sApPoD54WlzpJswvdbRs=";
};
cargoHash = "sha256-OswilwabVfoKIeHxo7sxCvgGH5dRfyTmnKED+TcxSV8=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
];
nativeInstallCheckInputs = [ versionCheckHook ];
checkFlags = [
# Test requires network access
"--skip=utils::test_get_infos"
];
doInstallCheck = true;
meta = {
description = "Live cryptocurrency prices CLI";
homepage = "https://github.com/mayeranalytics/coinlive";
changelog = "https://github.com/mayeranalytics/coinlive/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "coinlive";
};
}

View File

@@ -0,0 +1,95 @@
From 0259f2b936ee0d9288ff39c509c69a66f5b13b80 Mon Sep 17 00:00:00 2001
From: Stefan Vigerske <svigerske@gams.com>
Date: Mon, 11 Mar 2019 16:34:25 +0000
Subject: [PATCH 1/2] change more reinterpret_cast from NULL to C-cast, see
also #93
---
Clp/src/AbcSimplex.cpp | 48 +++++++++++++++++++++---------------------
Clp/src/ClpModel.cpp | 2 +-
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/Clp/src/AbcSimplex.cpp b/Clp/src/AbcSimplex.cpp
index 0eacd91e..1715e6d8 100644
--- a/Clp/src/AbcSimplex.cpp
+++ b/Clp/src/AbcSimplex.cpp
@@ -368,19 +368,19 @@ AbcSimplex::gutsOfInitialize(int numberRows,int numberColumns,bool doMore)
// say Steepest pricing
abcDualRowPivot_ = new AbcDualRowSteepest();
abcPrimalColumnPivot_ = new AbcPrimalColumnSteepest();
- internalStatus_ = newArray(reinterpret_cast<unsigned char *>(NULL),
+ internalStatus_ = newArray((unsigned char *)NULL,
sizeArray+maximumNumberTotal_);
- abcLower_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- abcUpper_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- abcCost_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+maximumNumberTotal_);
- abcDj_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- abcSolution_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+maximumNumberTotal_);
- //fromExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
- //toExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
- scaleFromExternal_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- offset_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- abcPerturbation_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- abcPivotVariable_ = newArray(reinterpret_cast<int *>(NULL),maximumAbcNumberRows_);
+ abcLower_ = newArray((double *)NULL,sizeArray);
+ abcUpper_ = newArray((double *)NULL,sizeArray);
+ abcCost_ = newArray((double *)NULL,sizeArray+maximumNumberTotal_);
+ abcDj_ = newArray((double *)NULL,sizeArray);
+ abcSolution_ = newArray((double *)NULL,sizeArray+maximumNumberTotal_);
+ //fromExternal_ = newArray((int *)NULL,sizeArray);
+ //toExternal_ = newArray((int *)NULL,sizeArray);
+ scaleFromExternal_ = newArray((double *)NULL,sizeArray);
+ offset_ = newArray((double *)NULL,sizeArray);
+ abcPerturbation_ = newArray((double *)NULL,sizeArray);
+ abcPivotVariable_ = newArray((int *)NULL,maximumAbcNumberRows_);
// Fill perturbation array
setupPointers(maximumAbcNumberRows_,maximumAbcNumberColumns_);
fillPerturbation(0,maximumNumberTotal_);
@@ -554,19 +554,19 @@ AbcSimplex::createSubProblem(int numberColumns,const int * whichColumn)
subProblem->maximumNumberTotal_= maximumAbcNumberRows_+numberColumns;
subProblem->numberTotalWithoutFixed_= subProblem->numberTotal_;
int sizeArray=2*subProblem->maximumNumberTotal_+maximumAbcNumberRows_;
- subProblem->internalStatus_ = newArray(reinterpret_cast<unsigned char *>(NULL),
+ subProblem->internalStatus_ = newArray((unsigned char *)NULL,
sizeArray+subProblem->maximumNumberTotal_);
- subProblem->abcLower_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- subProblem->abcUpper_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- subProblem->abcCost_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+subProblem->maximumNumberTotal_);
- subProblem->abcDj_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- subProblem->abcSolution_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+subProblem->maximumNumberTotal_);
- //fromExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
- //toExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
- subProblem->scaleFromExternal_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- subProblem->offset_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- subProblem->abcPerturbation_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
- subProblem->abcPivotVariable_ = newArray(reinterpret_cast<int *>(NULL),maximumAbcNumberRows_);
+ subProblem->abcLower_ = newArray((double *)NULL,sizeArray);
+ subProblem->abcUpper_ = newArray((double *)NULL,sizeArray);
+ subProblem->abcCost_ = newArray((double *)NULL,sizeArray+subProblem->maximumNumberTotal_);
+ subProblem->abcDj_ = newArray((double *)NULL,sizeArray);
+ subProblem->abcSolution_ = newArray((double *)NULL,sizeArray+subProblem->maximumNumberTotal_);
+ //fromExternal_ = newArray((int *)NULL,sizeArray);
+ //toExternal_ = newArray((int *)NULL,sizeArray);
+ subProblem->scaleFromExternal_ = newArray((double *)NULL,sizeArray);
+ subProblem->offset_ = newArray((double *)NULL,sizeArray);
+ subProblem->abcPerturbation_ = newArray((double *)NULL,sizeArray);
+ subProblem->abcPivotVariable_ = newArray((int *)NULL,maximumAbcNumberRows_);
subProblem->setupPointers(maximumAbcNumberRows_,numberColumns);
// could use arrays - but for now be safe
int * backward = new int [numberFullColumns+numberRows_];
diff --git a/Clp/src/ClpModel.cpp b/Clp/src/ClpModel.cpp
index 1fc905c4..83aa3b63 100644
--- a/Clp/src/ClpModel.cpp
+++ b/Clp/src/ClpModel.cpp
@@ -3845,7 +3845,7 @@ ClpModel::writeMps(const char *filename,
writer.setMpsData(*(matrix_->getPackedMatrix()), COIN_DBL_MAX,
getColLower(), getColUpper(),
objective,
- reinterpret_cast<const char*> (NULL) /*integrality*/,
+ (const char*)NULL /*integrality*/,
getRowLower(), getRowUpper(),
columnNames, rowNames);
// Pass in array saying if each variable integer
--
2.37.3

View File

@@ -0,0 +1,25 @@
From b36a5bd502fbf6b8ad31b6bc35c7bab4aff24313 Mon Sep 17 00:00:00 2001
From: Stefan Vigerske <svigerske@gams.com>
Date: Mon, 20 Jul 2020 18:39:20 +0200
Subject: [PATCH] use static_cast for static cast, fixes #319
---
Cbc/src/CbcModel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Cbc/src/CbcModel.cpp b/Cbc/src/CbcModel.cpp
index 8603942b..239bf0b4 100644
--- a/Cbc/src/CbcModel.cpp
+++ b/Cbc/src/CbcModel.cpp
@@ -5357,7 +5357,7 @@ void CbcModel::branchAndBound(int doStatistics)
OsiClpSolverInterface * clpSolver
= dynamic_cast<OsiClpSolverInterface *> (solver_);
if (clpSolver)
- clpSolver->setFakeObjective(reinterpret_cast<double *> (NULL));
+ clpSolver->setFakeObjective(static_cast<double *> (NULL));
}
#endif
moreSpecialOptions_ = saveMoreSpecialOptions;
--
2.37.3

View File

@@ -0,0 +1,26 @@
From 4571de031e528bc145590d6a1be5ceb87bd8cdb5 Mon Sep 17 00:00:00 2001
From: Stefan Vigerske <svigerske@gams.com>
Date: Mon, 11 Mar 2019 16:29:20 +0000
Subject: [PATCH 2/2] change reinterpret_cast of NULL to C-style case, fixes
#93
---
Clp/src/OsiClp/OsiClpSolverInterface.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Clp/src/OsiClp/OsiClpSolverInterface.cpp b/Clp/src/OsiClp/OsiClpSolverInterface.cpp
index 55dd4dcd..a0217d42 100644
--- a/Clp/src/OsiClp/OsiClpSolverInterface.cpp
+++ b/Clp/src/OsiClp/OsiClpSolverInterface.cpp
@@ -1448,7 +1448,7 @@ OsiClpSolverInterface::setupForRepeatedUse(int senseOfAdventure, int printOut)
if (stopPrinting) {
CoinMessages * messagesPointer = modelPtr_->messagesPointer();
// won't even build messages
- messagesPointer->setDetailMessages(100,10000,reinterpret_cast<int *> (NULL));
+ messagesPointer->setDetailMessages(100,10000,(int*)NULL);
}
#endif
}
--
2.37.3

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "coinmp";
version = "1.8.4";
src = fetchurl {
url = "https://www.coin-or.org/download/source/CoinMP/CoinMP-${finalAttrs.version}.tgz";
hash = "sha256-NFn7DMvdOTQnRGhDOJhKxMwVP7BDT0yujPdL1nSQo40=";
};
patches = [
# backport build fixes for pkgsMusl.CoinMP
(fetchpatch {
url = "https://github.com/coin-or/Cgl/commit/57d8c71cd50dc27a89eaeb4672499bca55f1fd72.patch";
extraPrefix = "Cgl/";
stripLen = 1;
hash = "sha256-NdwXpIL1w6kHVfhBFscTlpriQOfUXx860/4x7pK+698=";
})
# https://github.com/coin-or/Clp/commit/b637e1d633425ae21ec041bf7f9e06f56b741de0
./0001-change-more-reinterpret_cast-from-NULL-to-C-cast-see.patch
# https://github.com/coin-or/Clp/commit/e749fe6b11a90006d744af2ca2691220862e3a59
./0002-change-reinterpret_cast-of-NULL-to-C-style-case-fixe.patch
# https://github.com/coin-or/Cbc/commit/584fd12fba6a562d49864f44bedd13ee32d06999
./0001-use-static_cast-for-static-cast-fixes-319.patch
];
enableParallelBuilding = true;
env = lib.optionalAttrs stdenv.cc.isClang {
CXXFLAGS = "-std=c++14";
};
hardeningDisable = [ "format" ];
meta = with lib; {
homepage = "https://projects.coin-or.org/CoinMP/";
description = "COIN-OR lightweight API for COIN-OR libraries CLP, CBC, and CGL";
platforms = platforms.unix;
license = licenses.epl10;
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "cointop";
version = "1.6.10";
src = fetchFromGitHub {
owner = "miguelmota";
repo = "cointop";
rev = "v${version}";
sha256 = "sha256-NAw1uoBL/FnNLJ86L9aBCOY65aJn1DDGK0Cd0IO2kr0=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Fastest and most interactive terminal based UI application for tracking cryptocurrencies";
longDescription = ''
cointop is a fast and lightweight interactive terminal based UI
application for tracking and monitoring cryptocurrency coin stats in
real-time.
The interface is inspired by htop and shortcut keys are inspired by vim.
'';
homepage = "https://cointop.sh";
maintainers = with maintainers; [ sarcasticadmin ];
license = licenses.asl20;
mainProgram = "cointop";
};
}

View File

@@ -0,0 +1 @@
{ python3Packages }: with python3Packages; toPythonApplication colcon

View File

@@ -0,0 +1,33 @@
{
lib,
rustPlatform,
fetchFromGitHub,
openssl,
pkg-config,
}:
rustPlatform.buildRustPackage rec {
pname = "coldsnap";
version = "0.9.0";
src = fetchFromGitHub {
owner = "awslabs";
repo = "coldsnap";
rev = "v${version}";
hash = "sha256-8+YPKjHi3VURzSOflIa0x4uBkoDMYGFJiFcNJ+8NJ7Q=";
};
cargoHash = "sha256-4w79zZcgIulLIArY2ErOHwaWA8g/mA2cSKCzJx4X9vM=";
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
meta = with lib; {
homepage = "https://github.com/awslabs/coldsnap";
description = "Command line interface for Amazon EBS snapshots";
changelog = "https://github.com/awslabs/coldsnap/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
teams = [ teams.determinatesystems ];
mainProgram = "coldsnap";
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "colemak-dh";
version = "0-unstable-2022-08-07";
src = fetchFromGitHub {
owner = "ColemakMods";
repo = "mod-dh";
rev = "e846a5bd24d59ed15ba70b3a9d5363a38ca51d09";
hash = "sha256-RFOpN+tIMfakb7AZN0ock9eq2mytvL0DWedvQV67+ks=";
sparseCheckout = [ "console" ];
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/keymaps/i386/
gzip -r ./console
cp -r ./console $out/share/keymaps/i386/colemak
runHook postInstall
'';
meta = with lib; {
homepage = "https://colemakmods.github.io/mod-dh";
description = "Colemak mod for more comfortable typing";
license = licenses.publicDomain;
platforms = platforms.linux;
maintainers = with maintainers; [ monaaraj ];
};
}

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
darwin,
buildGoModule,
fetchFromGitHub,
installShellFiles,
lima,
makeWrapper,
qemu,
testers,
colima,
}:
buildGoModule rec {
pname = "colima";
version = "0.8.4";
src = fetchFromGitHub {
owner = "abiosoft";
repo = "colima";
tag = "v${version}";
hash = "sha256-TNq0lHNF6jwUqamJXYTxuF0Q9mfVwi8BaesQv87eRiE=";
# We need the git revision
leaveDotGit = true;
postFetch = ''
git -C $out rev-parse --short HEAD > $out/.git-revision
rm -rf $out/.git
'';
};
nativeBuildInputs = [
installShellFiles
makeWrapper
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
vendorHash = "sha256-ZwgzKCOEhgKK2LNRLjnWP6qHI4f6OGORvt3CREJf55I=";
# disable flaky Test_extractZones
# https://hydra.nixos.org/build/212378003/log
excludedPackages = "gvproxy";
env.CGO_ENABLED = 1;
preConfigure = ''
ldflags="-s -w -X github.com/abiosoft/colima/config.appVersion=${version} \
-X github.com/abiosoft/colima/config.revision=$(cat .git-revision)"
'';
postInstall = ''
wrapProgram $out/bin/colima \
--prefix PATH : ${
lib.makeBinPath [
# Suppress warning on `colima start`: https://github.com/abiosoft/colima/issues/1333
(lima.override {
withAdditionalGuestAgents = true;
})
qemu
]
}
installShellCompletion --cmd colima \
--bash <($out/bin/colima completion bash) \
--fish <($out/bin/colima completion fish) \
--zsh <($out/bin/colima completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = colima;
command = "HOME=$(mktemp -d) colima version";
};
meta = with lib; {
description = "Container runtimes with minimal setup";
homepage = "https://github.com/abiosoft/colima";
license = licenses.mit;
maintainers = with maintainers; [
aaschmid
tricktron
];
mainProgram = "colima";
};
}

View File

@@ -0,0 +1,15 @@
In the nix build, COOLWSD_VERSION_HASH becomes the same as COOLWSD_VERSION, e.g.
`24.04.3.5`. The web server that serves files from
`/browser/$COOLWSD_VERSION_HASH`, doesn't expect the hash to contain dots.
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -933,7 +933,7 @@ std::string FileServerRequestHandler::getRequestPathname(const HTTPRequest& requ
std::string path(requestUri.getPath());
- Poco::RegularExpression gitHashRe("/([0-9a-f]+)/");
+ Poco::RegularExpression gitHashRe("/([0-9a-f.]+)/");
std::string gitHash;
if (gitHashRe.extract(path, gitHash))
{

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,115 @@
{
autoreconfHook,
cairo,
cppunit,
fetchFromGitHub,
fetchpatch,
fetchNpmDeps,
lib,
libcap,
libpng,
libreoffice-collabora,
nodejs,
npmHooks,
pam,
pango,
pixman,
pkg-config,
poco,
python3,
rsync,
stdenv,
zstd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "collabora-online";
version = "24.04.13-2";
src = fetchFromGitHub {
owner = "CollaboraOnline";
repo = "online";
tag = "cp-${finalAttrs.version}";
hash = "sha256-d6i/aSmbim7UAKz9VX1ClbtIQravMq0r8beZC9FD6as=";
};
nativeBuildInputs = [
autoreconfHook
nodejs
npmHooks.npmConfigHook
pkg-config
python3
python3.pkgs.lxml
python3.pkgs.polib
rsync
];
buildInputs = [
cairo
cppunit
libcap
libpng
pam
pango
pixman
poco
zstd
];
enableParallelBuilding = true;
configureFlags = [
"--disable-setcap"
"--disable-werror"
"--enable-silent-rules"
"--with-lo-path=${libreoffice-collabora}/lib/collaboraoffice"
"--with-lokit-path=${libreoffice-collabora.src}/include"
];
patches = [
./fix-file-server-regex.patch
# https://github.com/CollaboraOnline/online/pull/11464/
(fetchpatch {
name = "fix-testPreProcessedFileSubstitution";
url = "https://github.com/CollaboraOnline/online/commit/76a4b64297d721d66603dc63f525324475036917.patch";
hash = "sha256-PGys1dpHLFsUKKA1YyxkJpbBbc2prySdGH/CZni90kI=";
})
];
postPatch = ''
cp ${./package-lock.json} ${finalAttrs.npmRoot}/package-lock.json
patchShebangs browser/util/*.py coolwsd-systemplate-setup scripts/*
substituteInPlace configure.ac --replace-fail '/usr/bin/env python3' python3
substituteInPlace coolwsd-systemplate-setup --replace-fail /bin/pwd pwd
'';
# Copy dummy self-signed certificates provided for testing.
postInstall = ''
cp etc/ca-chain.cert.pem etc/cert.pem etc/key.pem $out/etc/coolwsd
'';
npmDeps = fetchNpmDeps {
unpackPhase = "true";
# TODO: Use upstream `npm-shrinkwrap.json` once it's fixed
# https://github.com/CollaboraOnline/online/issues/9644
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
hash = "sha256-0RnGt9NLgyARgbh2GOcz7H3l4vtij8PD5jmcdUDB/5Y=";
};
npmRoot = "browser";
passthru = {
libreoffice = libreoffice-collabora; # Used by NixOS module.
};
meta = {
description = "Collaborative online office suite based on LibreOffice technology";
license = lib.licenses.mpl20;
maintainers = [ lib.maintainers.xzfc ];
homepage = "https://www.collaboraonline.com";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,38 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p common-updater-scripts prefetch-npm-deps jq sd nodejs
#shellcheck shell=bash
set -xeu -o pipefail
PACKAGE_DIR="$(realpath "$(dirname "$0")")"
cd "$PACKAGE_DIR/.."
while ! test -f default.nix; do cd .. ; done
NIXPKGS_DIR="$PWD"
new_version="$(
list-git-tags --url=https://github.com/CollaboraOnline/online \
| grep --perl-regex --only-matching '^cp-\K[0-9.-]+$' \
| sort --version-sort \
| tail -n1
)"
cd "$NIXPKGS_DIR"
update-source-version collabora-online "$new_version"
TMPDIR="$(mktemp -d)"
trap 'rm -rf "$TMPDIR"' EXIT
cd "$TMPDIR"
src="$(nix-build --no-link "$NIXPKGS_DIR" -A collabora-online.src)"
cp "$src"/browser/package.json .
npm install --package-lock-only
cp ./package-lock.json "$PACKAGE_DIR"
prev_npm_hash="$(nix-instantiate "$NIXPKGS_DIR" \
--eval --json \
-A collabora-online.npmDeps.hash \
| jq -r .
)"
new_npm_hash="$(prefetch-npm-deps ./package-lock.json)"
sd --fixed-strings "$prev_npm_hash" "$new_npm_hash" "$PACKAGE_DIR/package.nix"

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost,
libxml2,
minizip,
readline,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "collada-dom";
version = "2.5.2";
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "Gepetto";
repo = "collada-dom";
tag = "v${finalAttrs.version}";
hash = "sha256-53Gf6OLwrflZcrWKPuNPS0k+jlj5yTzCkI/QYQFta48=";
};
postInstall = ''
ln -s $out/include/*/* $out/include
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
boost
libxml2
minizip
readline
];
meta = {
description = "API that provides a C++ object representation of a COLLADA XML instance document";
longDescription = "This is a fork of [rdiankov/collada-dom](https://github.com/rdiankov/collada-dom) which has been unmaintained for six years.";
homepage = "https://github.com/Gepetto/collada-dom";
changelog = "https://github.com/Gepetto/collada-dom/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
sigmasquadron
marius851000
nim65s
];
platforms = lib.platforms.all;
# Fails to build.
badPlatforms = lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchurl,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "collapseos-cvm";
version = "20220316";
src = fetchurl {
url = "http://collapseos.org/files/collapseos-${version}.tar.gz";
hash = "sha256-8bt6wj93T82K9fqtuC/mctkMCzfvW0taxv6QAKeJb5g=";
};
buildInputs = [ ncurses ];
sourceRoot = "cvm";
postPatch = ''
substituteInPlace common.mk \
--replace "-lcurses" "-lncurses"
'';
installPhase = ''
runHook preInstall;
find . -type f -executable -exec install -Dt $out/bin {} \;
runHook postInstall;
'';
meta = {
description = "Virtual machine for Collapse OS (Forth operating system)";
changelog = "http://collapseos.org/files/CHANGES.txt";
downloadPage = "http://collapseos.org/files/";
homepage = "http://collapseos.org/";
license = lib.licenses.gpl3Only;
mainProgram = "cos-serial";
};
}

View File

@@ -0,0 +1,444 @@
Processing diff for: collectl.conf
--- a/collectl.conf 2025-08-14 08:42:24.434419733 +0000
+++ b/collectl.conf 2025-08-16 07:56:13.806350456 +0000
@@ -43,7 +43,7 @@
#Ps = /bin/ps
#Rpm = /bin/rpm
#Lspci = /sbin/lspci
-#Lctl = /usr/sbin/lctl
+#Lctl = /usr/sbin/lctl # disabled since collectl 4.0.4
# I n f i n i b a n d S u p p o r t
@@ -55,10 +55,11 @@
# variable below. PQuery for OFED, PCounter for get_pcounter calls and
# VStat for ALL non-ofed access of any kind.
# can disable either by commenting out the reference to VStat/PQuery below.
-PQuery = /usr/sbin/perfquery:/usr/bin/perfquery:/usr/local/ofed/bin/perfquery
-PCounter = /usr/mellanox/bin/get_pcounter
-VStat = /usr/mellanox/bin/vstat:/usr/bin/vstat
-OfedInfo = /usr/bin/ofed_info:/usr/local/ofed/bin/ofed_info
+# Disable the Infiniband support by default
+# PQuery = /usr/sbin/perfquery:/usr/bin/perfquery:/usr/local/ofed/bin/perfquery
+# PCounter = /usr/mellanox/bin/get_pcounter
+# VStat = /usr/mellanox/bin/vstat:/usr/bin/vstat
+# OfedInfo = /usr/bin/ofed_info:/usr/local/ofed/bin/ofed_info
# D e f a u l t s
@@ -116,7 +117,7 @@
# size, comment out the Resize line and uncomment TermHeight, setting it to
# what you want.
#TermHeight = 24
-Resize=/usr/bin/resize:/usr/X11R6/bin/resize
+Resize=@resize@
# To turn off Time:HiRes/glibc incompatibility checking, the following
# should be enabled and set to 0
@@ -125,7 +126,7 @@
# These control environmental monitoring and to use it you MUST have ipmitool
# installed (see http://ipmitool.sourceforge.net/). If not in the path shown
# below, you must change it.
-Ipmitool = /usr/bin/ipmitool:/usr/local/bin/ipmitool:/opt/hptc/sbin/ipmitool
+Ipmitool = @ipmitool@
IpmiCache = /var/run/collectl-ipmicache
IpmiTypes = fan,temp,current
Processing diff for: collectl
--- a/collectl 2025-08-14 08:42:24.434419733 +0000
+++ b/collectl 2025-08-16 09:25:20.238548613 +0000
@@ -69,14 +69,14 @@
use IO::Select;
use Cwd 'abs_path';
-$Cat= '/bin/cat';
-$Grep= '/bin/grep';
-$Egrep= '/bin/egrep';
-$Ps= '/bin/ps';
-$Rpm= '/bin/rpm';
-$Lspci= '/sbin/lspci';
-$Lctl= '/usr/sbin/lctl';
-$Dmidecode= '/usr/sbin/dmidecode';
+$Cat= '@cat@';
+$Grep= '@grep@';
+$Egrep= '@egrep@';
+$Ps= '@ps@';
+$Rpm= '@rpm@';
+$Lspci= '@lspci@';
+$Lctl= '/usr/sbin/lctl'; # disabled since collectl 4.0.4
+$Dmidecode= '@dmidecode@';
%TopProcTypes=qw(vsz '' rss '' syst '' usrt '' time '' accum '' rkb '' wkb '' iokb ''
rkbc '' wkbc '' iokbc '' ioall '' rsys '' wsys '' iosys ''
@@ -108,7 +108,7 @@
$syslogFlag=(eval {require "Sys/Syslog.pm" or die}) ? 1 : 0;
# Always nice to know if we're root
-$rootFlag=(!$PcFlag && `whoami`=~/root/) ? 1 : 0;
+$rootFlag=(!$PcFlag && `@whoami@`=~/root/) ? 1 : 0;
$SrcArch= $Config{"archname"};
$Version= '4.3.20';
@@ -126,15 +126,15 @@
# we're in the background. We also need to know if STDOUT connected to a terminal.
if (!$PcFlag)
{
- $MyDir=`pwd`;
- $Cat= 'cat';
+ $MyDir=`@pwd@`;
+ $Cat= '@cat@';
$Sep= '/';
$backFlag=(getpgrp()!=tcgetpgrp(0)) ? 1 : 0;
$termFlag= (-t STDOUT) ? 1 : 0;
}
else
{
- $MyDir=`cd`;
+ $MyDir=`@cd@`;
$Cat= 'type';
$Sep= '\\';
$backFlag=0;
@@ -148,7 +148,7 @@
# which was recorded with the data file and WILL override in playback mode.
# We also need our host name before calling initRecord() so we can log it at
# startup as well as for naming the logfile.
-$myHost=($PcFlag) ? `hostname` : `/bin/hostname`;
+$myHost=($PcFlag) ? `@hostname@` : `@hostname@`;
$myHost=(split(/\./, $myHost))[0];
chomp $myHost;
$Host=$myHost;
@@ -509,12 +509,12 @@
if ($runasUser!~/^\d+$/)
{
- $runasUid=(split(/:/, `grep ^$runasUser: /etc/passwd`))[2];
+ $runasUid=(split(/:/, `@grep@ ^$runasUser: /etc/passwd`))[2];
error("can't find '$runasUser' in /etc/passwd. Consider UID.") if !defined($runasUid);
}
if (defined($runasGroup) && $runasGroup!~/^\d+$/)
{
- $runasGid=(split(/:/, `grep ^$runasGroup: /etc/group`))[2];
+ $runasGid=(split(/:/, `@grep@ ^$runasGroup: /etc/group`))[2];
error("can't find '$runasGroup' in /etc/group. Consider GID.") if !defined($runasGid);
}
$runasUid=$runasUser if $runasUser=~/^\d+/;
@@ -1167,19 +1167,19 @@
if (!$PcFlag)
{
# This matches THIS host, but in playback mode will be reset to the target
- $Kernel=`uname -r`;
+ $Kernel=`@uname@ -r`;
chomp $Kernel;
error("collectl no longer supports 2.4 kernels") if $Kernel=~/^2\.4/;
- $LocalTimeZone=`date +%z`;
+ $LocalTimeZone=`@date@ +%z`;
chomp $LocalTimeZone;
# Some distros put lspci in /usr/sbin and others in /usr/bin, so take one last look in
# those before complaining, but only if in record mode AND only if looking at interconnects
if (!-e $Lspci && $playback eq '' && $subsys=~/x/i)
{
- $Lspci=(-e '/usr/sbin/lspci') ? '/usr/sbin/lspci' : '/usr/bin/lspci';
- if (!-e "/usr/sbin/lspci" && !-e "/usr/bin/lspci")
+ $Lspci='@lspci@';
+ if (!-e "@lspci@")
{
pushmsg('W', "-sx disabled because 'lspci' not in $Lspci or '/usr/sbin' or '/usr/bin'");
pushmsg('W', "If somewhere else, move it or define in collectl.conf");
@@ -1274,7 +1274,7 @@
# it further on so not to worry, but at least record a warning.
$pid=`$Cat $PidFile`;
chomp $pid;
- @ps=`ps axo pid,command`;
+ @ps=`@ps@ axo pid,command`;
foreach my $line (@ps)
{
$line=~s/^\s+//; # trim leading whitespace for short pids
@@ -1551,14 +1551,14 @@
}
# if -N, set priority to 20
-`renice 20 $$` if $niceFlag;
+`@renice@ 20 $$` if $niceFlag;
# Couldn't find anywhere else to put this one...
error("-sT only works with -P for now (too much data)")
if $TFlag && !$plotFlag;
# get parent pid so we can check later to see it still there
-$stat=`cat /proc/$$/stat`;
+$stat=`@cat@ /proc/$$/stat`;
$myPpid=(split(/\s+/, $stat))[3];
###############################
@@ -2311,7 +2311,7 @@
printBriefCounters('T');
}
- `stty echo` if !$PcFlag && $termFlag && !$backFlag; # in brief mode, we turned it off
+ `@stty@ echo` if !$PcFlag && $termFlag && !$backFlag; # in brief mode, we turned it off
my $temp=(!$msgFlag) ? ' Try again with -m.' : '';
print "No files selected contain the selected data.$temp\n" if !$numProcessed;
exit(0);
@@ -2453,7 +2453,7 @@
open STDIN, '/dev/null' or logmsg("F", "Can't read /dev/null: $!");
open STDOUT, '>/dev/null' or logmsg("F", "Can't write to /dev/null: $!");
open STDERR, '>/dev/null' or logmsg("F", "Can't write to /dev/null: $!");
- `echo $$ > $PidFile`;
+ `@echo@ $$ > $PidFile`;
# Now that we're set up to start, if '--runas' has been sprecified we need to do a
# few things that require privs before actually changing our UID. Also note the
@@ -2469,8 +2469,8 @@
$logname=(-d $filename) ? $filename : dirname($filename);
$logname.="/$myHost-collectl-$yymm.log";
- `chown $runasUid $logname`;
- `chgrp $runasGid $logname` if defined($runasGid);
+ `@chown@ $runasUid $logname`;
+ `@chgrp@ $runasGid $logname` if defined($runasGid);
# now we can change our process's ownership taking care to do the group first
# since we won't be able to change anything once we change our UID.
@@ -3244,7 +3244,7 @@
# close logs cleanly and turn echo back on because when 'brief' we turned it off.
closeLogs($subsys);
unlink $PidFile if $daemonFlag;
-`stty echo` if !$PcFlag && $termFlag && !$backFlag;
+`@stty@ echo` if !$PcFlag && $termFlag && !$backFlag;
# clean up when in pure top mode
if ($numTop && !$topVertFlag)
@@ -4350,7 +4350,7 @@
if (!-e $temp)
{
logmsg('W', "Creating directory '$temp'");
- `mkdir $temp`;
+ `@mkdir@ $temp`;
}
# track number of times same file processed, primarily for options 'a/c'. in
@@ -5363,7 +5363,7 @@
# build up the search list being extra neat and leaving
# off possible duplicate /etc
- $configFile="$BinDir/$ConfigFile;$etcDir/$ConfigFile";
+ $configFile="$BinDir/../etc/$ConfigFile;$etcDir/$ConfigFile";
$configFile.=";/etc/$ConfigFile" if $etcDir ne '/etc';
}
print "Config File Search Path: $configFile\n" if $debug & 1;
@@ -5789,7 +5789,7 @@
# what gets stored in /proc/XXX/stat and to make sure we look at the same
# values dynamically as well as staticly, we better pull cmd from the stat
# file itself.
- @ps=`ps axo pid,ppid,uid,comm,user`;
+ @ps=`@ps@ axo pid,ppid,uid,comm,user`;
my $firstFilePass=1;
foreach $process (@ps)
{
@@ -6228,7 +6228,7 @@
$briefFlag=0;
$verboseFlag=1;
intervalPrint(time);
- `stty echo` if !$PcFlag && $termFlag && !$backFlag;
+ `@stty@ echo` if !$PcFlag && $termFlag && !$backFlag;
}
sub error
@@ -6241,7 +6241,7 @@
# printText() will try to send error over socket and we want it local.
$sockFlag=0 if $serverFlag;
- `stty echo` if !$PcFlag && $termFlag && !$backFlag;
+ `@stty@ echo` if !$PcFlag && $termFlag && !$backFlag;
logmsg("F", "Error: $text") if $daemonFlag;
# we can only call printText() when formatit loaded.
Processing diff for: colmux
--- a/colmux 2025-08-14 08:42:24.438419919 +0000
+++ b/colmux 2025-08-15 07:38:22.003168089 +0000
@@ -78,7 +78,7 @@
my $License="colmux may be copied only under the terms of either the Artistic License\n";
$License.= "or the GNU General Public License, which may be found in the source kit";
-my $Ping='/bin/ping';
+my $Ping='@ping@';
my $ResizePath='/usr/bin/resize:/usr/X11R6/bin/resize';
my $Route='/sbin/route';
my $Ifconfig='/sbin/ifconfig';
@@ -235,7 +235,7 @@
$Collectl="sudo $Collectl" if $sudoFlag;
# ok if host not in known_hosts and when not debugging be sure to turn off motd
-my $Ssh='/usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes';
+my $Ssh='@ssh@ -o StrictHostKeyChecking=no -o BatchMode=yes';
$Ssh.=" -o ServerAliveInterval=$keepalive" if $keepalive ne '';
$Ssh.=" -q" unless $debug;
@@ -357,7 +357,7 @@
# See if any host specs contain 'username@' & reset 'localhost' and
# adjust maximum hostname length if necessary.
my $hostlen=$hostWidth;
-my $myhost=`hostname`;
+my $myhost=`@hostname@`;
chomp $myhost;
my (%usernames, %sshswitch, %aliases);
@@ -510,7 +510,7 @@
$line=~s/^\s+//; # can have leading space
my $pid=(split(/\s+/, $line))[0];
print "Killing ssh with pid: $pid\n" if $debug & 1;
- `kill $pid`;
+ `@kill@ $pid`;
}
sleep 1; # wait a tad for ssh in thread to exit
close PS;
@@ -983,7 +983,7 @@
$line=~s/^\s+//;
my $pid=(split(/\s+/, $line))[0];
print "Killing ssh with pid: $pid\n" if $debug & 1;
- `kill $pid`;
+ `@kill@ $pid`;
}
}
@@ -1179,7 +1179,7 @@
foreach my $host (keys %files)
{
print "Killing pid $files{$host}->{pid} for '$host'\n" if $debug & 1;
- `kill -9 $files{$host}->{pid}`;
+ `@kill@ -9 $files{$host}->{pid}`;
#close $files{$host}->{fd} or error("Failed to close playback file for '$host'");
}
Processing diff for: formatit.ph
--- a/formatit.ph 2025-08-14 08:42:24.438419919 +0000
+++ b/formatit.ph 2025-08-15 07:18:19.548190580 +0000
@@ -20,19 +20,19 @@
$rawPFlag=0; # always 0 when no files involved
# In some case, we need to know if we're root.
- $rootFlag=`whoami`;
+ $rootFlag=`@whoami@`;
$rootFlag=($rootFlag=~/root/) ? 1 : 0;
# be sure to remove domain portion if present. also note we keep the hostname in
# two formats, one in it's unaltered form (at least needed by lustre directory
# parsing) as well as all lc because it displays nicer.
- $Host=`hostname`;
+ $Host=`@hostname@`;
chomp $Host;
$Host=(split(/\./, $Host))[0];
$HostLC=lc($Host);
# when was system booted?
- $uptime=(split(/\s+/, `cat /proc/uptime`))[0];
+ $uptime=(split(/\s+/, `@cat@ /proc/uptime`))[0];
$boottime=time-$uptime;
$Distro=cat('/etc/redhat-release') if -e '/etc/redhat-release';
@@ -83,11 +83,11 @@
if ($subsys=~/y/i && $slabinfoFlag || $slubinfoFlag)
{
$message='';
- $message='/proc/slabinfo' if $slabinfoFlag && !(eval {`cat /proc/slabinfo 2>/dev/null` or die});
- $message='/sys/slab' if $slubinfoFlag && !(eval {`cat /proc/slubinfo 2>/dev/null` or die});
+ $message='/proc/slabinfo' if $slabinfoFlag && !(eval {`@cat@ /proc/slabinfo 2>/dev/null` or die});
+ $message='/sys/slab' if $slubinfoFlag && !(eval {`@cat@ /proc/slubinfo 2>/dev/null` or die});
if ($message ne '')
{
- my $whoami=`whoami`;
+ my $whoami=`@whoami@`;
chomp $whoami;
disableSubsys('y', "/proc/slabinfo is not readable by $whoami");
$interval=~s/(^\d*):\d+/$1:/ if $subsys!~/z/i; # remove int2 if not needed or we'll get error
@@ -132,7 +132,7 @@
for (my $i=1; $i<$NumCpus; $i++)
{
- my $online=`cat /sys/devices/system/cpu/cpu$i/online`;
+ my $online=`@cat@ /sys/devices/system/cpu/cpu$i/online`;
chomp $online;
$cpuEnabled[$i]=$online;
@@ -266,7 +266,7 @@
$ibSpeed='??';
if (-e '/sys/class/infiniband')
{
- $line=`cat /sys/class/infiniband/*/ports/1/rate 2>&1`;
+ $line=`@cat@ /sys/class/infiniband/*/ports/1/rate 2>&1`;
if ($line=~/\s*(\d+)\s+(\S)/)
{
$ibSpeed=$1;
@@ -669,7 +669,7 @@
{
# Get Luster and SFS Versions before looking at any data structures in the
# 'lustreCheck' routines because things change over time
- $temp=`cat /proc/fs/lustre/version | grep lustre 2>/dev/null`;
+ $temp=`@cat@ /proc/fs/lustre/version | grep lustre 2>/dev/null`;
$temp=~/lustre: (\d+.*)/;
$cfsVersion=$1;
$sfsVersion='';
@@ -716,7 +716,7 @@
# The first step is to build up a hash of the sizes of all the
# existing partitions. Since we're only doing this once, a 'cat's
# overhead should be minimal
- @partitions=`cat /proc/partitions`;
+ @partitions=`@cat@ /proc/partitions`;
foreach $part (@partitions)
{
# ignore blank lines and header
@@ -778,7 +778,7 @@
$temp=`head -n 1 /proc/slabinfo`;
$temp=~/(\d+\.\d+)/;
$SlabVersion=$1;
- $NumSlabs=`cat /proc/slabinfo | wc -l`*1;
+ $NumSlabs=`@cat@ /proc/slabinfo | wc -l`*1;
chomp $NumSlabs;
$NumSlabs-=2;
@@ -4127,7 +4127,7 @@
$netSpeeds{$netName}='??';
if ($line ne '')
{
- $speed=`cat $line 2>&1`;
+ $speed=`@cat@ $line 2>&1`;
chomp $speed;
$line=~/.*\/(\S+)\/speed/;
my $netName=$1;
Processing diff for: graphite.ph
--- a/graphite.ph 2025-08-14 08:42:24.442420106 +0000
+++ b/graphite.ph 2025-08-14 08:44:07.351625049 +0000
@@ -117,7 +117,7 @@
# behavior for -f logs matches that of -A
$rawtooFlag=1 if $filename ne '' && !$plotFlag;
- $graphiteMyHost=(!$graphiteFqdnFlag) ? `hostname` : `hostname -f`;
+ $graphiteMyHost=(!$graphiteFqdnFlag) ? `@hostname@` : `@hostname@ -f`;
chomp $graphiteMyHost;
$graphiteMyHost =~ s/\./$graphiteEscape/g if $graphiteEscape ne '';
Processing diff for: vmsum.ph
--- a/vmsum.ph 2025-08-14 08:42:24.442420106 +0000
+++ b/vmsum.ph 2025-08-14 08:44:24.184414112 +0000
@@ -20,8 +20,8 @@
my $oneMB=1024*1024;
my ($debug, $helpFlag, $instMin, $versionFlag, $zeroFlag);
-my $Ssh= '/usr/bin/ssh';
-my $Ping='/bin/ping';
+my $Ssh= '@ssh@';
+my $Ping='@ping@';
my $PingTimeout=1;
# these control writing the vm text file
@@ -32,7 +32,7 @@
my $lexprFlag=0;
my $noNetMsg=''; # if not null, problem with n/w stats (very rare)
-my $hostname=`hostname`;
+my $hostname=`@hostname@`;
chomp $hostname;
sub vmsumInit

View File

@@ -0,0 +1,133 @@
--- a/INSTALL 2025-08-14 08:46:43.845548078 +0000
+++ b/INSTALL 2025-08-14 08:50:33.771706783 +0000
@@ -1,28 +1,29 @@
#!/bin/sh
-DESTDIR=${DESTDIR:="/"}
+# Use Nix output directory instead of system paths
+DESTDIR=${out}
-BINDIR=$DESTDIR/usr/bin
-DOCDIR=$DESTDIR/usr/share/doc/collectl
-SHRDIR=$DESTDIR/usr/share/collectl
-MANDIR=$DESTDIR/usr/share/man/man1
-SYSDDIR=$DESTDIR/usr/lib/systemd/system
-ETCDIR=$DESTDIR/etc
-INITDIR=$ETCDIR/init.d
+BINDIR=$out/bin
+DOCDIR=$out/share/doc/collectl
+SHRDIR=$out/share/collectl
+MANDIR=$out/share/man/man1
+SYSDDIR=$out/lib/systemd/system
+ETCDIR=$out/etc
+INITDIR=$out/etc/init.d
mkdir -p $BINDIR
mkdir -p $DOCDIR
mkdir -p $SHRDIR
mkdir -p $ETCDIR
mkdir -p $MANDIR
-mkdir -p $INITDIR
+# Skip init.d creation for Nix
mkdir -p $SHRDIR/util
mkdir -p $DESTDIR/var/log/collectl
cp collectl colmux $BINDIR
cp collectl.conf $ETCDIR
cp man1/* $MANDIR
-cp initd/* $INITDIR
+# Skip init scripts for Nix
cp docs/* $DOCDIR
cp GPL ARTISTIC COPYING $DOCDIR
@@ -42,87 +43,12 @@
# Force in case redoing the install and files already zipped
gzip -f $MANDIR/collectl*
-chmod 755 $INITDIR/collectl*
+# Skip chmod on init scripts for Nix
chmod 444 $ETCDIR/collectl.conf
chmod 755 $BINDIR/collectl
chmod 444 $DOCDIR/ARTISTIC $DOCDIR/COPYING $DOCDIR/GPL
chmod 444 $SHRDIR/*ph
chmod 755 $SHRDIR/util/*
-# remove any stale versions in case the names/numbers used have changed.
-# on new ROCKS installion 'rm' isn't there yet! [thanks roy]
-if [ -x /bin/rm ] ; then
- /bin/rm -f $INITDIR/rc*.d/*collectl
- /bin/rm -f $ETCDIR/rc.d/rc*.d/*collectl
-fi
-
-# only if systemd is supported
-if [ -d $SYSDDIR ]; then
- cp service/collectl.service $SYSDDIR
-fi
-
-# Try and decide which distro this is based on distro specific files.
-distro=1
-if [ -f /sbin/yast ]; then
- distro=2
- mv -f $INITDIR/collectl-suse $INITDIR/collectl
- rm -f $INITDIR/collectl-debian
- rm -f $INITDIR/collectl-generic
-fi
-
-# debian
-if [ -f /usr/sbin/update-rc.d ]; then
- distro=3
- mv -f $INITDIR/collectl-debian $INITDIR/collectl
- rm -f $INITDIR/collectl-suse
- rm -f $INITDIR/collectl-generic
-
- # only if we're installing under /
- [ "$DESTDIR" = "/" ] && update-rc.d collectl defaults
-fi
-
-# redhat
-if [ -f /etc/redhat-release ]; then
- distro=4
- rm -f $INITDIR/collectl-suse
- rm -f $INITDIR/collectl-debian
- rm -f $INITDIR/collectl-generic
- if [ -f /usr/sbin/chkconfig ]; then
- [ "$DESTDIR" = "/" ] && chkconfig --add collectl
- fi
-# Not needed for RHEL8 and higher
-fi
-
-# gentoo
-if [ -f $ETCDIR/gentoo-release ]; then
- distro=5
- mv -f $INITDIR/collectl-generic $INITDIR/collectl
- rm -f $INITDIR/collectl-suse
- rm -f $INITDIR/collectl-debian
- [ "$DESTDIR" = "/" ] && rc-update -a collectl default
-fi
-
-# Generic Distros
-# If /etc/init.d doesn't exist and/or there's no way to use chkconfig or
-# rc-update you're going to have to add some custom code below...
-if [ ${distro} = 1 ]; then
-
- mv -f $INITDIR/collectl-generic $INITDIR/collectl
- rm -f $INITDIR/collectl-suse
- rm -f $INITDIR/collectl-debian
-
- # If in not installing under / there's nothing extra do
- [ $DESTDIR != "/" ] && exit 0
-
- # figure out how to handle reboots
- if [ -f /sbin/chkconfig ]; then
- chkconfig --add collectl
- elif [ -f /sbin/rc-update ]; then
- rc-update -a collectl default
-# RHEL9 has no chkconfig
- elif [ -f /usr/bin/systemctl ]; then
- systemctl enable collectl
- else
- echo "could not figure out how to enable restarting across reboots"
- fi
-fi
+# Skip all distro-specific service installation for Nix
+# Nix manages services differently through NixOS modules

View File

@@ -0,0 +1,126 @@
{
callPackage,
lib,
stdenv,
fetchFromGitHub,
replaceVars,
# Runtime dependencies
coreutils,
dmidecode,
gnugrep,
inetutils,
openssh,
pciutils,
perl,
procps,
rpm,
util-linux,
xterm,
# Dependencies
ipmitool,
}:
let
inherit (lib) getExe getExe' genAttrs;
# Define tool dependencies for script patches
scriptDeps =
let
mkTools = pkg: tools: genAttrs tools (tool: getExe' pkg tool);
in
# Tools from various packages
(mkTools coreutils [
"cat"
"whoami"
"pwd"
"uname"
"date"
"mkdir"
"chown"
"chgrp"
"echo"
"kill"
"cd"
"stty"
])
// (mkTools util-linux [ "renice" ])
// (mkTools gnugrep [
"grep"
"egrep"
])
// (mkTools inetutils [
"hostname"
"ping"
])
// (mkTools procps [ "ps" ])
// (mkTools pciutils [ "lspci" ])
// (mkTools xterm [ "resize" ])
// (mkTools dmidecode [ "dmidecode" ])
// (mkTools rpm [ "rpm" ])
// {
# Single-tool packages
ssh = getExe openssh;
ipmitool = getExe ipmitool;
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "collectl";
version = "4.3.20.1";
src = fetchFromGitHub {
owner = "sharkcz";
repo = "collectl";
rev = finalAttrs.version;
hash = "sha256-OJGCuxWvoId1cQ5Ugiav5/T/NzddwhM+gG3s0BnYYz0=";
};
strictDeps = true;
patches = [
(replaceVars ./0001-scripts-external-executable-calls.patch scriptDeps)
./0002-fix-install-script.patch
];
buildInputs = [
perl
dmidecode
ipmitool
];
dontBuild = true;
installPhase = ''
runHook preInstall
bash ./INSTALL
runHook postInstall
'';
passthru.tests.run = callPackage ./test.nix { };
meta = {
description = "Performance monitoring tool for Linux systems";
longDescription = ''
Collectl is a light-weight performance monitoring tool capable of reporting
interactively as well as logging to disk. It reports statistics on cpu, disk,
infiniband, lustre, memory, network, nfs, process, quadrics, slabs and more
in easy to read format.
The `--config` option allows specifying a custom configuration file path,
overriding the default configuration file in the package's etc directory.
'';
homepage = "https://github.com/sharkcz/collectl";
downloadPage = "https://github.com/sharkcz/collectl/releases";
license = with lib.licenses; [
artistic1
gpl1Plus
];
maintainers = with lib.maintainers; [ seven_bear ];
platforms = lib.platforms.linux;
mainProgram = "collectl";
};
})

View File

@@ -0,0 +1,44 @@
{
runCommand,
collectl,
coreutils,
}:
runCommand "collectl-test"
{
nativeBuildInputs = [
collectl
coreutils
];
meta.timeout = 60;
}
''
# Test basic functionality - limit to 5 seconds to avoid hanging
timeout 5s collectl -c1 >/dev/null || true
# Test that explicit config file option still works with original config
timeout 5s collectl --config ${collectl}/etc/collectl.conf -c1 >/dev/null || true
# Test custom config file path override
custom_config_path=$(mktemp)
cp ${collectl}/etc/collectl.conf "$custom_config_path"
# Test that collectl uses the custom config file path
config_output=$(timeout 5s collectl --config "$custom_config_path" -c1 -d1 2>&1 | grep -i "Config File Search Path:" | head -1)
expected_output="Config File Search Path: $custom_config_path"
if [ "$config_output" = "$expected_output" ]; then
echo " Custom config file path test passed"
else
echo " Custom config file path test failed"
echo "Expected: $expected_output"
echo "Got: $config_output"
exit 1
fi
# Cleanup
rm -f "$custom_config_path"
# Signal success
touch $out
''

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
appstream-glib,
desktop-file-utils,
libadwaita,
meson,
ninja,
pkg-config,
wrapGAppsHook4,
gtk4,
python3,
gettext,
cmake,
gobject-introspection,
unstableGitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "collector";
version = "0-unstable-2024-11-11";
src = fetchFromGitHub {
owner = "mijorus";
repo = "collector";
rev = "54cf58e79066284e6c62fdabca2a4b444131ee09";
hash = "sha256-V+FMpmI4vcqfBwgxnSxRm1RJ8If19yvSKAqrf+mI604=";
};
nativeBuildInputs = [
meson
pkg-config
ninja
gettext
cmake
desktop-file-utils
appstream-glib
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
gobject-introspection
(python3.withPackages (
ps: with ps; [
pillow
requests
pygobject3
]
))
];
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
meta = {
description = "Drag multiple files and folders on to Collection window, drop them anywhere";
mainProgram = "collector";
homepage = "https://github.com/mijorus/collector";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ CaptainJawZ ];
};
})

View File

@@ -0,0 +1,116 @@
{
stdenv,
lib,
fetchFromGitHub,
crystal,
wrapGAppsHook4,
desktopToDarwinBundle,
gobject-introspection,
nautilus-python,
python3,
libadwaita,
openssl,
libxml2,
pkg-config,
gitUpdater,
_experimental-update-script-combinators,
runCommand,
crystal2nix,
writeShellScript,
}:
crystal.buildCrystalPackage rec {
pname = "Collision";
version = "3.10.0";
src = fetchFromGitHub {
owner = "GeopJr";
repo = "Collision";
rev = "v${version}";
hash = "sha256-ZXGhMicwlkXUw8I6HUNVxY4vCaVixdV76+wYn34Py6Q=";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail 'gtk-update-icon-cache $(PREFIX)/share/icons/hicolor' 'true'
'';
shardsFile = ./shards.nix;
copyShardDeps = true;
preBuild = ''
cd lib/gi-crystal && shards build -Dpreview_mt --release --no-debug && \
install -Dm755 bin/gi-crystal ../../bin/gi-crystal && cd ../..
'';
# Crystal compiler has a strange issue with OpenSSL. The project will not compile due to
# main_module:(.text+0x6f0): undefined reference to `SSL_library_init'
# There is an explanation for this https://danilafe.com/blog/crystal_nix_revisited/
# Shortly, adding pkg-config to buildInputs along with openssl fixes the issue.
nativeBuildInputs = [
wrapGAppsHook4
pkg-config
gobject-introspection
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
buildInputs = [
libadwaita
openssl
libxml2
nautilus-python
python3.pkgs.pygobject3
];
buildTargets = [
"bindings"
"build"
];
doCheck = false;
doInstallCheck = false;
installTargets = [
"desktop"
"install"
];
postInstall = ''
install -Dm555 ./nautilus-extension/collision-extension.py -t $out/share/nautilus-python/extensions
'';
passthru = {
updateScript = _experimental-update-script-combinators.sequence [
(gitUpdater { rev-prefix = "v"; })
(_experimental-update-script-combinators.copyAttrOutputToFile "collision.shardLock" "./shard.lock")
{
command = [
(writeShellScript "update-lock" "cd $1; ${lib.getExe crystal2nix}")
./.
];
supportedFeatures = [ "silent" ];
}
{
command = [
"rm"
"./shard.lock"
];
supportedFeatures = [ "silent" ];
}
];
shardLock = runCommand "shard.lock" { inherit src; } ''
cp $src/shard.lock $out
'';
};
meta = with lib; {
description = "Check hashes for your files";
homepage = "https://github.com/GeopJr/Collision";
license = licenses.bsd2;
mainProgram = "collision";
maintainers = with maintainers; [ sund3RRR ];
teams = [ teams.gnome-circle ];
};
}

Some files were not shown because too many files have changed in this diff Show More