Merge remote-tracking branch 'origin/master' into staging-next

This commit is contained in:
K900 2025-05-04 13:12:07 +03:00
commit a505ac8f87
50 changed files with 701 additions and 434 deletions

View file

@ -11,7 +11,6 @@
boost, boost,
jsoncpp, jsoncpp,
libbsd, libbsd,
pcre,
# GUI/Desktop # GUI/Desktop
dbus, dbus,
glibmm, glibmm,
@ -74,7 +73,6 @@ stdenv.mkDerivation rec {
boost boost
jsoncpp jsoncpp
libbsd libbsd
pcre
glibmm glibmm
hicolor-icon-theme hicolor-icon-theme
gsettings-desktop-schemas gsettings-desktop-schemas

View file

@ -27,7 +27,6 @@
nlopt, nlopt,
opencascade-occt_7_6_1, opencascade-occt_7_6_1,
openvdb, openvdb,
pcre,
qhull, qhull,
tbb_2021_11, tbb_2021_11,
wxGTK32, wxGTK32,
@ -129,7 +128,6 @@ stdenv.mkDerivation (finalAttrs: {
nlopt nlopt
opencascade-override' opencascade-override'
openvdb_tbb_2021_8 openvdb_tbb_2021_8
pcre
qhull qhull
tbb_2021_11 tbb_2021_11
wxGTK-override' wxGTK-override'

View file

@ -226,5 +226,6 @@ stdenv.mkDerivation rec {
homepage = "https://www.kicad.org/"; homepage = "https://www.kicad.org/";
license = lib.licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all; platforms = lib.platforms.all;
broken = stdenv.hostPlatform.isDarwin;
}; };
} }

View file

@ -1,60 +0,0 @@
{
lib,
pythonPackages,
fetchPypi,
git,
}:
pythonPackages.buildPythonApplication rec {
pname = "git-up";
version = "2.3.0";
format = "pyproject";
src = fetchPypi {
pname = "git_up";
inherit version;
hash = "sha256-SncbnK6LxsleKRa/sSCm/8dsgPw/XJGvYfkcIeWYDy4=";
};
nativeBuildInputs = with pythonPackages; [
poetry-core
];
# git should be on path for tool to work correctly
propagatedBuildInputs =
[
git
]
++ (with pythonPackages; [
colorama
gitpython
termcolor
]);
nativeCheckInputs = [
git
pythonPackages.pytest7CheckHook
];
# 1. git fails to run as it cannot detect the email address, so we set it
# 2. $HOME is by default not a valid dir, so we have to set that too
# https://github.com/NixOS/nixpkgs/issues/12591
preCheck = ''
export HOME=$TMPDIR
git config --global user.email "nobody@example.com"
git config --global user.name "Nobody"
'';
postInstall = ''
rm -r $out/${pythonPackages.python.sitePackages}/PyGitUp/tests
'';
meta = with lib; {
homepage = "https://github.com/msiemens/PyGitUp";
description = "Git pull replacement that rebases all local branches when pulling";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.all;
mainProgram = "git-up";
};
}

View file

@ -2,20 +2,22 @@
lib, lib,
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
versionCheckHook,
}: }:
buildGoModule rec { buildGoModule (finalAttrs: {
pname = "atlantis"; pname = "atlantis";
version = "0.34.0"; version = "0.34.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "runatlantis"; owner = "runatlantis";
repo = "atlantis"; repo = "atlantis";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-2xgU3H6X9EcbySV9RXN5oCn+7EkfdwebeYsL5+Vl69E="; hash = "sha256-2xgU3H6X9EcbySV9RXN5oCn+7EkfdwebeYsL5+Vl69E=";
}; };
ldflags = [ ldflags = [
"-X=main.version=${version}" "-X=main.version=${finalAttrs.version}"
"-X=main.date=1970-01-01T00:00:00Z" "-X=main.date=1970-01-01T00:00:00Z"
]; ];
@ -24,15 +26,15 @@ buildGoModule rec {
subPackages = [ "." ]; subPackages = [ "." ];
doInstallCheck = true; doInstallCheck = true;
installCheckPhase = '' nativeInstallCheckInputs = [ versionCheckHook ];
$out/bin/atlantis version | grep ${version} > /dev/null versionCheckProgram = "${placeholder "out"}/bin/atlantis";
''; versionCheckProgramArg = "version";
meta = with lib; { meta = {
homepage = "https://github.com/runatlantis/atlantis"; homepage = "https://github.com/runatlantis/atlantis";
description = "Terraform Pull Request Automation"; description = "Terraform Pull Request Automation";
mainProgram = "atlantis"; mainProgram = "atlantis";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = with maintainers; [ jpotier ]; maintainers = with lib.maintainers; [ jpotier ];
}; };
} })

View file

@ -25,6 +25,6 @@ buildGoModule rec {
mainProgram = "aws-lambda-rie"; mainProgram = "aws-lambda-rie";
homepage = "https://github.com/aws/aws-lambda-runtime-interface-emulator"; homepage = "https://github.com/aws/aws-lambda-runtime-interface-emulator";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ teto ]; maintainers = [ ];
}; };
} }

View file

@ -2,16 +2,15 @@
lib, lib,
appimageTools, appimageTools,
fetchurl, fetchurl,
webkitgtk_4_1,
}: }:
let let
pname = "bitcomet"; pname = "bitcomet";
version = "2.13.1"; version = "2.13.2";
src = fetchurl { src = fetchurl {
url = "https://download.bitcomet.com/linux/x86_64/BitComet-${version}-x86_64.AppImage"; url = "https://download.bitcomet.com/linux/x86_64/BitComet-${version}-x86_64.AppImage";
hash = "sha256-s8kCsPKr5XoS/Y6KzuiQV9ARq2UIo2PPKRinvik0aRo="; hash = "sha256-T66hmWmjt7ZZj03IxTSYtNUBoFHgwOoAIOHMyJSAmbU=";
}; };
appimageContents = appimageTools.extractType2 { inherit pname version src; }; appimageContents = appimageTools.extractType2 { inherit pname version src; };
@ -23,19 +22,19 @@ appimageTools.wrapType2 {
pkgs: with pkgs; [ pkgs: with pkgs; [
libxml2 libxml2
libpng libpng
webkitgtk_4_1 webkitgtk_4_0
]; ];
extraInstallCommands = '' extraInstallCommands = ''
install -Dm644 ${appimageContents}/com.bitcomet.linux.desktop $out/share/applications/bitcomet.desktop install -Dm644 ${appimageContents}/com.bitcomet.linux.desktop $out/share/applications/bitcomet.desktop
substituteInPlace $out/share/applications/bitcomet.desktop \ substituteInPlace $out/share/applications/bitcomet.desktop \
--replace-fail 'Exec=usr/bin/BitComet' 'Exec=bitcomet' --replace-fail "Exec=usr/bin/BitComet" "Exec=bitcomet"
cp -r ${appimageContents}/usr/share/icons $out/share/icons cp -r ${appimageContents}/usr/share/icons $out/share/icons
''; '';
meta = { meta = {
homepage = "https://www.bitcomet.com"; homepage = "https://www.bitcomet.com";
description = "Free BitTorrent download client"; description = "BitTorrent download client";
mainProgram = "bitcomet"; mainProgram = "bitcomet";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree; license = lib.licenses.unfree;

View file

@ -4,23 +4,24 @@
rustPlatform, rustPlatform,
fetchFromGitHub, fetchFromGitHub,
installShellFiles, installShellFiles,
makeWrapper, makeBinaryWrapper,
pkg-config, pkg-config,
libgit2, libgit2,
zlib, zlib,
buildPackages, buildPackages,
versionCheckHook,
withClipboard ? true, withClipboard ? true,
withTrash ? !stdenv.hostPlatform.isDarwin, withTrash ? !stdenv.hostPlatform.isDarwin,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage (finalAttrs: {
pname = "broot"; pname = "broot";
version = "1.46.3"; version = "1.46.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Canop"; owner = "Canop";
repo = "broot"; repo = "broot";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-MfBlJ7SokBKkAkmBSj4NsE2hKVqYeGN3z/xiq2VK3vU="; hash = "sha256-MfBlJ7SokBKkAkmBSj4NsE2hKVqYeGN3z/xiq2VK3vU=";
}; };
@ -29,7 +30,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ nativeBuildInputs = [
installShellFiles installShellFiles
makeWrapper makeBinaryWrapper
pkg-config pkg-config
]; ];
@ -43,13 +44,13 @@ rustPlatform.buildRustPackage rec {
buildFeatures = lib.optionals withTrash [ "trash" ] ++ lib.optionals withClipboard [ "clipboard" ]; buildFeatures = lib.optionals withTrash [ "trash" ] ++ lib.optionals withClipboard [ "clipboard" ];
RUSTONIG_SYSTEM_LIBONIG = true; env.RUSTONIG_SYSTEM_LIBONIG = true;
postPatch = '' postPatch = ''
# Fill the version stub in the man page. We can't fill the date # Fill the version stub in the man page. We can't fill the date
# stub reproducibly. # stub reproducibly.
substitute man/page man/broot.1 \ substitute man/page man/broot.1 \
--replace "#version" "${version}" --replace-fail "#version" "${finalAttrs.version}"
''; '';
postInstall = postInstall =
@ -84,16 +85,15 @@ rustPlatform.buildRustPackage rec {
''; '';
doInstallCheck = true; doInstallCheck = true;
installCheckPhase = '' nativeInstallCheckInputs = [ versionCheckHook ];
$out/bin/broot --version | grep "${version}" versionCheckProgramArg = "--version";
'';
meta = with lib; { meta = with lib; {
description = "Interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands"; description = "Interactive tree view, a fuzzy search, a balanced BFS descent and customizable commands";
homepage = "https://dystroy.org/broot/"; homepage = "https://dystroy.org/broot/";
changelog = "https://github.com/Canop/broot/releases/tag/v${version}"; changelog = "https://github.com/Canop/broot/releases/tag/v${finalAttrs.version}";
maintainers = with maintainers; [ dywedir ]; maintainers = with maintainers; [ dywedir ];
license = with licenses; [ mit ]; license = with licenses; [ mit ];
mainProgram = "broot"; mainProgram = "broot";
}; };
} })

View file

@ -180,15 +180,15 @@ stdenv.mkDerivation rec {
( (
cd $out/lib cd $out/lib
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64:$out/lib" libcanonufr2r.so.1.0.0 patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${lib.getLib stdenv.cc.cc}/lib:${stdenv.cc.libc}/lib:$out/lib" libcanonufr2r.so.1.0.0
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64" libcaepcmufr2.so.1.0 patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${lib.getLib stdenv.cc.cc}/lib:${stdenv.cc.libc}/lib" libcaepcmufr2.so.1.0
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64" libColorGearCufr2.so.2.0.0 patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${lib.getLib stdenv.cc.cc}/lib:${stdenv.cc.libc}/lib" libColorGearCufr2.so.2.0.0
) )
( (
cd $out/bin cd $out/bin
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64" cnsetuputil2 cnpdfdrv patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${lib.getLib stdenv.cc.cc}/lib:${stdenv.cc.libc}/lib" cnsetuputil2 cnpdfdrv
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64:$out/lib" cnpkbidir cnrsdrvufr2 cnpkmoduleufr2r cnjbigufr2 patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${lib.getLib stdenv.cc.cc}/lib:${stdenv.cc.libc}/lib:$out/lib" cnpkbidir cnrsdrvufr2 cnpkmoduleufr2r cnjbigufr2
wrapProgram $out/bin/cnrsdrvufr2 \ wrapProgram $out/bin/cnrsdrvufr2 \
--prefix LD_LIBRARY_PATH ":" "$out/lib" \ --prefix LD_LIBRARY_PATH ":" "$out/lib" \

View file

@ -87,6 +87,16 @@
"@rollup/rollup-win32-arm64-msvc@npm:4.40.0": "f14da0ce3062084d81fd42432ddf6c3cd869b4c48dc1acd803bc151bc3b508dbd290d60624ab5507d691b9e53bec81a508b61688304f171088549067ec86445d", "@rollup/rollup-win32-arm64-msvc@npm:4.40.0": "f14da0ce3062084d81fd42432ddf6c3cd869b4c48dc1acd803bc151bc3b508dbd290d60624ab5507d691b9e53bec81a508b61688304f171088549067ec86445d",
"@rollup/rollup-win32-ia32-msvc@npm:4.40.0": "e6849d8cb8c276681f558b8212d58340488814e697486d9d125c1191479a4819387f681945f59c2b9fdd40020403cb72a099906960625da65d2114cf3df701e5", "@rollup/rollup-win32-ia32-msvc@npm:4.40.0": "e6849d8cb8c276681f558b8212d58340488814e697486d9d125c1191479a4819387f681945f59c2b9fdd40020403cb72a099906960625da65d2114cf3df701e5",
"@rollup/rollup-win32-x64-msvc@npm:4.40.0": "347f3af8176858afaec0f4f0d7951d4cda81f77c30e8260c678a11809bcdee0542762f27f6a4194562c2a8a6321a774ea523216ed8cf105e041eff7498443f28", "@rollup/rollup-win32-x64-msvc@npm:4.40.0": "347f3af8176858afaec0f4f0d7951d4cda81f77c30e8260c678a11809bcdee0542762f27f6a4194562c2a8a6321a774ea523216ed8cf105e041eff7498443f28",
"@swc/core-darwin-arm64@npm:1.11.21": "6f228ce5497f8b797d9b838af6d51c8fc27d1643d13b033ed762ab5247047da91efa3e61f38040b5ff326bfb6af0ed663f5ec8319574db1c0e355d64c9c2b665",
"@swc/core-darwin-x64@npm:1.11.21": "8f7fcf910f17ab6d30fe55d7498f0ff2ac47e1e0fad749e01151891d5257f49c6354dae31917cc5097230940f9a068fcd981441e7c9581b1373e9e9c4d1ff9aa",
"@swc/core-linux-arm-gnueabihf@npm:1.11.21": "5f0d964b13b3c138fe0b3249b852db4330707d4584ed5d5b0b71fb72023e3b35f3faa88c6b8f49970f7adee57976e7e1fc9115be194b91f435249b6531602e1c",
"@swc/core-linux-arm64-gnu@npm:1.11.21": "203995730e55bfe640055a7adbb0c6b133c698aa018394d0338d00d311b10f874e46cdc0579585fb443505a3361b3da185436ad9fea553ecbed697a4f810ea7e",
"@swc/core-linux-arm64-musl@npm:1.11.21": "9618139c32eefd5acf184fc0c5e09986f170cec1069296a274c32b694a5a2129ae7aa21b8d016d5c186574929f05d456c6f4babdd0e528021dee4c51605da2d8",
"@swc/core-linux-x64-gnu@npm:1.11.21": "886a4f4a3ad6d0d3b437a250bf36b0395b34f4731381ce1cbbe43b05fb7ab4aa12a23c3f0e33bc4b2703ebcdad9a7e3fc18b7481a79e372ecc331c1e3eca1437",
"@swc/core-linux-x64-musl@npm:1.11.21": "069f33ba7b9376494f7345efed1c845e201857bbe5ba165ca8026760989344eaf0e5efbbc7f711a6c776385aa5ad383cee75543687c024854acb296c4e4752c1",
"@swc/core-win32-arm64-msvc@npm:1.11.21": "05ea5df6614075ec8487a91cb047a30aebeef3f142232a2feb0a475c85f2d64a876aef4183849f43480b9b5786afad7b3cb2bc1f53060d71ab6ff439a71317f3",
"@swc/core-win32-ia32-msvc@npm:1.11.21": "ad1ba754c36131238f2ac8ec51ffc4b987888b45b3008c0fbdd31d85d6fc039f8dd9c5d188c24cb72c4f4f345090a4dcfbcbfd840e954b7aeeb2974e0baf0e4a",
"@swc/core-win32-x64-msvc@npm:1.11.21": "0fb0c108c2e4a3bd82251f7552c9daa8c243829617bee7d954d1b0e021214184ead5c08dd108b3a5ac2d501797db794246a25867970ef2082f844f47b5b25070",
"dmg-license@npm:1.0.11": "feef35cfb45270a72daadcca9584be5cb840f924448b9d4e543fcd61f1b6d471151049f277c91de1d8b003fad6203d0176066a5f427a01df5fb073402cb8c8b7", "dmg-license@npm:1.0.11": "feef35cfb45270a72daadcca9584be5cb840f924448b9d4e543fcd61f1b6d471151049f277c91de1d8b003fad6203d0176066a5f427a01df5fb073402cb8c8b7",
"iconv-corefoundation@npm:1.1.7": "bc6f08ac421e5e92ed20f3825f123fd705e036612b2b6aa687958de753c06f32e54f0203ef55540869e3ee189eaea15e43a2757f3a90e555c4dd512c9422da43" "iconv-corefoundation@npm:1.1.7": "bc6f08ac421e5e92ed20f3825f123fd705e036612b2b6aa687958de753c06f32e54f0203ef55540869e3ee189eaea15e43a2757f3a90e555c4dd512c9422da43"
} }

View file

@ -18,20 +18,30 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "cherry-studio"; pname = "cherry-studio";
version = "1.2.7"; version = "1.2.10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CherryHQ"; owner = "CherryHQ";
repo = "cherry-studio"; repo = "cherry-studio";
tag = "v${finalAttrs.version}"; tag = "v${finalAttrs.version}";
hash = "sha256-Pxxv6f6YHjc1BAT93ASY2XUsB0CGVo4F/DcM7tReS9U="; hash = "sha256-txzZbtA6Fvc/2cpD9YM5wwtZix+qjtW0B6aAV4I7Ce8=";
}; };
postPatch = ''
substituteInPlace src/main/services/ConfigManager.ts \
--replace-fail "ConfigKeys.AutoUpdate, true" "ConfigKeys.AutoUpdate, false" \
--replace-fail "ConfigKeys.AutoUpdate, value" "ConfigKeys.AutoUpdate, false"
substituteInPlace src/main/services/AppUpdater.ts \
--replace-fail " = isActive" " = false"
substituteInPlace src/renderer/src/hooks/useSettings.ts \
--replace-fail "isAutoUpdate)" "false)"
'';
missingHashes = ./missing-hashes.json; missingHashes = ./missing-hashes.json;
offlineCache = yarn-berry.fetchYarnBerryDeps { offlineCache = yarn-berry.fetchYarnBerryDeps {
inherit (finalAttrs) src missingHashes; inherit (finalAttrs) src missingHashes;
hash = "sha256-I5K0JEFOuk9ugLBz/TON8RxBx4MojMk8Ol9XRg0Rxi8="; hash = "sha256-rKXUGfBL8upKU5MIe9fqHyEETNKsWdiUdsbHmvJPQdQ=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View file

@ -1,8 +1,10 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused jq nix bash coreutils nix-update #!nix-shell -i bash -p curl gnused jq nix bash coreutils nix-update yarn-berry.yarn-berry-fetcher
set -eou pipefail set -eou pipefail
PACKAGE_DIR=$(realpath $(dirname $0))
latestTag=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/CherryHQ/cherry-studio/releases/latest | jq --raw-output .tag_name) latestTag=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/CherryHQ/cherry-studio/releases/latest | jq --raw-output .tag_name)
latestVersion=$(echo "$latestTag" | sed 's/^v//') latestVersion=$(echo "$latestTag" | sed 's/^v//')
@ -13,4 +15,14 @@ if [[ "$currentVersion" == "$latestVersion" ]]; then
exit 0 exit 0
fi fi
nix-update cherry-studio --version "$latestVersion" nix-update cherry-studio --version "$latestVersion" || true
export HOME=$(mktemp -d)
src=$(nix-build --no-link $PWD -A cherry-studio.src)
TMPDIR=$(mktemp -d)
cp --recursive --no-preserve=mode $src/* $TMPDIR
cd $TMPDIR
yarn-berry-fetcher missing-hashes yarn.lock >$PACKAGE_DIR/missing-hashes.json
rm -rf $TMPDIR
nix-update cherry-studio --version skip || true

View file

@ -3,16 +3,18 @@
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
installShellFiles, installShellFiles,
versionCheckHook,
writableTmpDirAsHomeHook,
}: }:
buildGoModule rec { buildGoModule (finalAttrs: {
pname = "conftest"; pname = "conftest";
version = "0.59.0"; version = "0.59.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "open-policy-agent"; owner = "open-policy-agent";
repo = "conftest"; repo = "conftest";
tag = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-bmZp1cPNTm6m30YxjlWdnfv2437nDXH+taDNFZ0OKIY="; hash = "sha256-bmZp1cPNTm6m30YxjlWdnfv2437nDXH+taDNFZ0OKIY=";
}; };
vendorHash = "sha256-aPvGbtAucb9OdcydO4dMLJrrM3XretPI7zyJULlm1fg="; vendorHash = "sha256-aPvGbtAucb9OdcydO4dMLJrrM3XretPI7zyJULlm1fg=";
@ -20,17 +22,13 @@ buildGoModule rec {
ldflags = [ ldflags = [
"-s" "-s"
"-w" "-w"
"-X github.com/open-policy-agent/conftest/internal/commands.version=${version}" "-X github.com/open-policy-agent/conftest/internal/commands.version=${finalAttrs.version}"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
installShellFiles installShellFiles
]; ];
preCheck = ''
export HOME="$(mktemp -d)"
'';
postInstall = '' postInstall = ''
installShellCompletion --cmd conftest \ installShellCompletion --cmd conftest \
--bash <($out/bin/conftest completion bash) \ --bash <($out/bin/conftest completion bash) \
@ -38,19 +36,23 @@ buildGoModule rec {
--zsh <($out/bin/conftest completion zsh) --zsh <($out/bin/conftest completion zsh)
''; '';
doInstallCheck = true; nativeCheckInputs = [
installCheckPhase = '' writableTmpDirAsHomeHook
export HOME="$(mktemp -d)" ];
$out/bin/conftest --version | grep ${version} > /dev/null
'';
meta = with lib; { doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
meta = {
description = "Write tests against structured configuration data"; description = "Write tests against structured configuration data";
mainProgram = "conftest"; mainProgram = "conftest";
downloadPage = "https://github.com/open-policy-agent/conftest"; downloadPage = "https://github.com/open-policy-agent/conftest";
homepage = "https://www.conftest.dev"; homepage = "https://www.conftest.dev";
changelog = "https://github.com/open-policy-agent/conftest/releases/tag/v${version}"; changelog = "https://github.com/open-policy-agent/conftest/releases/tag/v${finalAttrs.version}";
license = licenses.asl20; license = lib.licenses.asl20;
longDescription = '' longDescription = ''
Conftest helps you write tests against structured configuration data. Conftest helps you write tests against structured configuration data.
Using Conftest you can write tests for your Kubernetes configuration, Using Conftest you can write tests for your Kubernetes configuration,
@ -61,9 +63,9 @@ buildGoModule rec {
assertions. You can read more about Rego in 'How do I write policies' in assertions. You can read more about Rego in 'How do I write policies' in
the Open Policy Agent documentation. the Open Policy Agent documentation.
''; '';
maintainers = with maintainers; [ maintainers = with lib.maintainers; [
jk jk
yurrriq yurrriq
]; ];
}; };
} })

View file

@ -3,21 +3,22 @@
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
nixosTests, nixosTests,
versionCheckHook,
}: }:
buildGoModule rec { buildGoModule (finalAttrs: {
pname = "ferretdb"; pname = "ferretdb";
version = "1.24.0"; version = "1.24.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "FerretDB"; owner = "FerretDB";
repo = "FerretDB"; repo = "FerretDB";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-WMejspnk2PvJhvNGi4h+DF+fzipuOMcS1QWim5DnAhQ="; hash = "sha256-WMejspnk2PvJhvNGi4h+DF+fzipuOMcS1QWim5DnAhQ=";
}; };
postPatch = '' postPatch = ''
echo v${version} > build/version/version.txt echo v${finalAttrs.version} > build/version/version.txt
echo nixpkgs > build/version/package.txt echo nixpkgs > build/version/package.txt
''; '';
@ -32,22 +33,21 @@ buildGoModule rec {
# the binary panics if something required wasn't set during compilation # the binary panics if something required wasn't set during compilation
doInstallCheck = true; doInstallCheck = true;
installCheckPhase = '' nativeInstallCheckInputs = [ versionCheckHook ];
$out/bin/ferretdb --version | grep ${version} versionCheckProgramArg = "--version";
'';
passthru.tests = nixosTests.ferretdb; passthru.tests = nixosTests.ferretdb;
meta = with lib; { meta = {
description = "Truly Open Source MongoDB alternative"; description = "Truly Open Source MongoDB alternative";
mainProgram = "ferretdb"; mainProgram = "ferretdb";
changelog = "https://github.com/FerretDB/FerretDB/releases/tag/v${version}"; changelog = "https://github.com/FerretDB/FerretDB/releases/tag/v${finalAttrs.version}";
homepage = "https://www.ferretdb.com/"; homepage = "https://www.ferretdb.com/";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = with maintainers; [ maintainers = with lib.maintainers; [
dit7ya dit7ya
noisersup noisersup
julienmalka julienmalka
]; ];
}; };
} })

View file

@ -12,14 +12,14 @@
let let
pname = "flclash"; pname = "flclash";
version = "0.8.83"; version = "0.8.84";
src = src =
(fetchFromGitHub { (fetchFromGitHub {
owner = "chen08209"; owner = "chen08209";
repo = "FlClash"; repo = "FlClash";
tag = "v${version}"; tag = "v${version}";
hash = "sha256-vkek2pHeXiIQ8pv5t8mRJDvqojhYW5cTUeKWN/mhGu8="; hash = "sha256-XrZay7C8XIqwAATwDd8U+sh0BcNN5ap43ibYVs6qXFg=";
fetchSubmodules = true; fetchSubmodules = true;
}).overrideAttrs }).overrideAttrs
(_: { (_: {
@ -41,7 +41,7 @@ let
modRoot = "core"; modRoot = "core";
vendorHash = "sha256-YrJtvkDpSQnx5AE+3zjCim8lrTjARzJvz6nCkKVOCew="; vendorHash = "sha256-Wm1VheSLaAS+tLQq7lNkPzoEER1sKiNczUgYLSfuLng=";
env.CGO_ENABLED = 0; env.CGO_ENABLED = 0;

View file

@ -0,0 +1,61 @@
{
lib,
fetchPypi,
python3Packages,
writableTmpDirAsHomeHook,
gitMinimal,
}:
python3Packages.buildPythonApplication rec {
pname = "git-up";
version = "2.3.0";
format = "pyproject";
src = fetchPypi {
pname = "git_up";
inherit version;
hash = "sha256-SncbnK6LxsleKRa/sSCm/8dsgPw/XJGvYfkcIeWYDy4=";
};
pythonRelaxDeps = [
"termcolor"
];
build-system = with python3Packages; [
poetry-core
];
# required in PATH for tool to work
propagatedBuildInputs = [ gitMinimal ];
dependencies = with python3Packages; [
colorama
gitpython
termcolor
];
nativeCheckInputs = [
gitMinimal
python3Packages.pytest7CheckHook
writableTmpDirAsHomeHook
];
# git fails without email address
preCheck = ''
git config --global user.email "nobody@example.com"
git config --global user.name "Nobody"
'';
postInstall = ''
rm -r $out/${python3Packages.python.sitePackages}/PyGitUp/tests
'';
meta = {
homepage = "https://github.com/msiemens/PyGitUp";
description = "Git pull replacement that rebases all local branches when pulling";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ peterhoeg ];
platforms = lib.platforms.all;
mainProgram = "git-up";
};
}

View file

@ -9,18 +9,19 @@
fortune, fortune,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "gtypist"; pname = "gtypist";
version = "2.9.5"; version = "2.10.1";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/gtypist/gtypist-${version}.tar.xz"; url = "mirror://gnu/gtypist/gtypist-${finalAttrs.version}.tar.xz";
sha256 = "0xzrkkmj0b1dw3yr0m9hml2y634cc4h61im6zwcq57s7285z8fn1"; hash = "sha256-ymGAVOkfHtXvBD/MQ1ALutcByVnDGETUaI/yKEmsJS0=";
}; };
CFLAGS = "-std=gnu89"; CFLAGS = "-std=gnu99";
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ buildInputs = [
ncurses ncurses
perl perl
@ -32,11 +33,11 @@ stdenv.mkDerivation rec {
--prefix PATH : "${fortune}/bin" \ --prefix PATH : "${fortune}/bin" \
''; '';
meta = with lib; { meta = {
homepage = "https://www.gnu.org/software/gtypist"; homepage = "https://www.gnu.org/software/gtypist";
description = "Universal typing tutor"; description = "Universal typing tutor";
license = licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin; platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with maintainers; [ pSub ]; maintainers = with lib.maintainers; [ pSub ];
}; };
} })

View file

@ -6,11 +6,11 @@
appimageTools.wrapType2 rec { appimageTools.wrapType2 rec {
pname = "jet-pilot"; pname = "jet-pilot";
version = "1.31.1"; version = "1.35.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/unxsist/jet-pilot/releases/download/v${version}/jet-pilot_${version}_amd64.AppImage"; url = "https://github.com/unxsist/jet-pilot/releases/download/v${version}/JET.Pilot_${version}_amd64.AppImage";
hash = "sha256-FKrqWhFX6we+NRIO7wcqkjlDj7oy0zrIhAXTOAoYxNw="; hash = "sha256-W1VRV29ZV8nD3wAcSNAsWguN8s+zio0lsVaZwAnCOwE=";
}; };
appimageContents = appimageTools.extractType2 { inherit pname version src; }; appimageContents = appimageTools.extractType2 { inherit pname version src; };

View file

@ -9,17 +9,19 @@
autoconf-archive, autoconf-archive,
pkg-config, pkg-config,
bash-completion, bash-completion,
libwebp,
libexif,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
version = "1.2.0"; version = "1.3.2";
pname = "jp2a"; pname = "jp2a";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Talinx"; owner = "Talinx";
repo = "jp2a"; repo = "jp2a";
rev = "v${version}"; tag = "v${finalAttrs.version}";
sha256 = "sha256-TyXEaHemKfCMyGwK6P2vVL9gPWRLbkaNP0g+/UYGSVc="; hash = "sha256-GcwwzVgF7BK2N8TL8z/7R7Ry1e9pmGiXUrOAQQmPIBo=";
}; };
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
@ -30,21 +32,24 @@ stdenv.mkDerivation rec {
pkg-config pkg-config
bash-completion bash-completion
]; ];
buildInputs = [ buildInputs = [
libjpeg libjpeg
libpng libpng
ncurses ncurses
libwebp
libexif
]; ];
installFlags = [ "bashcompdir=\${out}/share/bash-completion/completions" ]; installFlags = [ "bashcompdir=\${out}/share/bash-completion/completions" ];
meta = with lib; { meta = {
broken = stdenv.hostPlatform.isDarwin; broken = stdenv.hostPlatform.isDarwin;
homepage = "https://csl.name/jp2a/"; homepage = "https://csl.name/jp2a/";
description = "Small utility that converts JPG images to ASCII"; description = "Small utility that converts JPG images to ASCII";
license = licenses.gpl2Only; license = lib.licenses.gpl2Only;
maintainers = [ maintainers.FlorianFranzen ]; maintainers = [ lib.maintainers.FlorianFranzen ];
platforms = platforms.unix; platforms = lib.platforms.unix;
mainProgram = "jp2a"; mainProgram = "jp2a";
}; };
} })

View file

@ -1,62 +1,38 @@
{ {
lib, lib,
python3Packages,
fetchFromGitHub, fetchFromGitHub,
python3,
libsForQt5, libsForQt5,
ghostscript, ghostscript,
qt5,
fetchPypi,
}: }:
let python3Packages.buildPythonApplication rec {
py = python3.override {
self = py;
packageOverrides = self: super: {
# Can be removed once this is merged
# https://github.com/arminstraub/krop/pull/40
pypdf2 = super.pypdf2.overridePythonAttrs (oldAttrs: rec {
version = "2.12.1";
src = fetchPypi {
pname = "PyPDF2";
inherit version;
hash = "sha256-4D7xirzHXadBoKzBp3SSU0loh744zZiHvM4c7jk9pF4=";
};
});
};
};
in
py.pkgs.buildPythonApplication rec {
pname = "krop"; pname = "krop";
version = "0.6.0"; version = "0.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "arminstraub"; owner = "arminstraub";
repo = pname; repo = "krop";
rev = "v${version}"; tag = "v${version}";
sha256 = "1ygzc7vlwszqmsd3v1dsqp1dpsn6inx7g8gck63alvf88dbn8m3s"; hash = "sha256-8mhTUP0oS+AnZXVmywxBTbR1OOg18U0RQ1H9lyjaiVI=";
}; };
propagatedBuildInputs = with py.pkgs; [ nativeBuildInputs = [ libsForQt5.wrapQtAppsHook ];
pyqt5
pypdf2
poppler-qt5
ghostscript
];
buildInputs = [ buildInputs = [
libsForQt5.poppler libsForQt5.poppler
libsForQt5.qtwayland libsForQt5.qtwayland
]; ];
nativeBuildInputs = [ qt5.wrapQtAppsHook ]; dependencies = with python3Packages; [
pyqt5
pypdf2
poppler-qt5
ghostscript
];
makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ]; makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ];
postInstall = ''
install -m666 -Dt $out/share/applications krop.desktop
'';
# Disable checks because of interference with older Qt versions // xcb # Disable checks because of interference with older Qt versions // xcb
doCheck = false; doCheck = false;

View file

@ -0,0 +1,30 @@
{
lib,
buildDotnetModule,
fetchFromGitHub,
}:
buildDotnetModule {
pname = "liborbispkg-pkgtool";
version = "0.3-unstable-2024-10-12";
src = fetchFromGitHub {
owner = "OpenOrbis";
repo = "LibOrbisPkg";
rev = "75616a28de0f49f05eeff872211e806fb6de3818";
hash = "sha256-ySlMzUfJ0IXi/NWbj53jqCRDNm9Xh4TuffyKhNh4wuM=";
};
projectFile = "PkgTool.Core/PkgTool.Core.csproj";
postFixup = ''
mv $out/bin/PkgTool.Core $out/bin/pkgtool
'';
meta = {
description = "Library, GUI, CLI for creating, inspecting, and modifying PS4 PKG, SFO, PFS, and related filetypes";
homepage = "https://github.com/OpenOrbis/LibOrbisPkg";
license = lib.licenses.lgpl3Plus;
maintainers = [ lib.maintainers.ryand56 ];
mainProgram = "pkgtool";
};
}

View file

@ -35,5 +35,7 @@ stdenv.mkDerivation rec {
]; ];
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [ maintainers.GabrielDougherty ]; maintainers = [ maintainers.GabrielDougherty ];
# build tool make_bin is built for host
broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
}; };
} }

View file

@ -64,5 +64,7 @@ stdenv.mkDerivation rec {
dandellion dandellion
]; ];
inherit (nodejs.meta) platforms; inherit (nodejs.meta) platforms;
# napi_build doesn't handle most cross-compilation configurations
broken = (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) || stdenv.hostPlatform.isStatic;
}; };
} }

View file

@ -3,16 +3,17 @@
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
installShellFiles, installShellFiles,
versionCheckHook,
}: }:
buildGoModule rec { buildGoModule (finalAttrs: {
pname = "metal-cli"; pname = "metal-cli";
version = "0.25.0"; version = "0.25.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "equinix"; owner = "equinix";
repo = pname; repo = "metal-cli";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-+hpsGFZHuVhh+fKVcap0vhoUmRs3xPgUwW8SD56m6uI="; hash = "sha256-+hpsGFZHuVhh+fKVcap0vhoUmRs3xPgUwW8SD56m6uI=";
}; };
@ -21,7 +22,7 @@ buildGoModule rec {
ldflags = [ ldflags = [
"-s" "-s"
"-w" "-w"
"-X github.com/equinix/metal-cli/cmd.Version=${version}" "-X github.com/equinix/metal-cli/cmd.Version=${finalAttrs.version}"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -38,21 +39,20 @@ buildGoModule rec {
doCheck = false; doCheck = false;
doInstallCheck = true; doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/metal";
versionCheckProgramArg = "--version";
installCheckPhase = '' meta = {
$out/bin/metal --version | grep ${version}
'';
meta = with lib; {
description = "Official Equinix Metal CLI"; description = "Official Equinix Metal CLI";
homepage = "https://github.com/equinix/metal-cli/"; homepage = "https://github.com/equinix/metal-cli/";
changelog = "https://github.com/equinix/metal-cli/releases/tag/v${version}"; changelog = "https://github.com/equinix/metal-cli/releases/tag/v${finalAttrs.version}";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ maintainers = with lib.maintainers; [
Br1ght0ne Br1ght0ne
nshalman nshalman
teutat3s teutat3s
]; ];
mainProgram = "metal"; mainProgram = "metal";
}; };
} })

View file

@ -87,6 +87,5 @@ stdenv.mkDerivation rec {
license = lib.licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ ]; maintainers = with lib.maintainers; [ ];
knownVulnerabilities = [ "https://github.com/mihomo-party-org/mihomo-party/issues/706" ];
}; };
} }

View file

@ -51,6 +51,9 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_WITH_PROXSUITE" true) (lib.cmakeBool "BUILD_WITH_PROXSUITE" true)
] ]
++ lib.optional (stdenv.hostPlatform.isDarwin) (
lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'py-test-clqr-osqp'"
)
++ lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ( ++ lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) (
lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'test_solvers'" lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'test_solvers'"
); );

View file

@ -3,6 +3,7 @@
stdenv, stdenv,
fetchFromGitHub, fetchFromGitHub,
SDL2, SDL2,
libGL,
cmake, cmake,
makeWrapper, makeWrapper,
unstableGitUpdater, unstableGitUpdater,
@ -26,6 +27,7 @@ stdenv.mkDerivation rec {
]; ];
buildInputs = [ buildInputs = [
SDL2 SDL2
libGL
]; ];
installPhase = '' installPhase = ''

View file

@ -8,20 +8,19 @@
gumbo, gumbo,
ncurses, ncurses,
sqlite, sqlite,
yajl,
nix-update-script, nix-update-script,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "newsraft"; pname = "newsraft";
version = "0.29"; version = "0.30";
src = fetchFromGitea { src = fetchFromGitea {
domain = "codeberg.org"; domain = "codeberg.org";
owner = "newsraft"; owner = "newsraft";
repo = "newsraft"; repo = "newsraft";
rev = "newsraft-${finalAttrs.version}"; rev = "newsraft-${finalAttrs.version}";
hash = "sha256-6rDnGVOApSURuXom+XxPPOG7lxMbHGTL+4Oqrx+Jq2w="; hash = "sha256-h9gjw2EjWWNdyQT2p4wgWlz4TNitDBX5fPbNNH9/th4=";
}; };
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
@ -31,11 +30,14 @@ stdenv.mkDerivation (finalAttrs: {
gumbo gumbo
ncurses ncurses
sqlite sqlite
yajl
]; ];
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
install -Dm444 doc/newsraft.desktop -t $out/share/applications
'';
passthru.updateScript = nix-update-script { }; passthru.updateScript = nix-update-script { };
meta = { meta = {

View file

@ -0,0 +1,45 @@
{
lib,
fetchFromGitHub,
buildNpmPackage,
nodejs,
versionCheckHook,
nix-update-script,
}:
buildNpmPackage (finalAttrs: {
pname = "openapi-down-convert";
version = "0.14.1";
src = fetchFromGitHub {
owner = "apiture";
repo = "openapi-down-convert";
tag = "v${finalAttrs.version}";
hash = "sha256-8csxj2HfOb9agDmwNmksNaiQhRd+3D1tf0vWU2w+XWw=";
};
npmDepsHash = "sha256-5VgFAiphahDKz3ZhzNEdQOFxvhvDy+S/qOClqBgMzSg=";
postInstall = ''
find $out/lib -type f \( -name '*.ts' \) -delete
rm -r $out/lib/node_modules/@apiture/openapi-down-convert/node_modules/typescript
rm $out/lib/node_modules/@apiture/openapi-down-convert/node_modules/.bin/*
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Convert an OpenAPI 3.1.x document to OpenAPI 3.0.x format";
homepage = "https://github.com/apiture/openapi-down-convert";
changelog = "https://github.com/apiture/openapi-down-convert/releases/tag/v${finalAttrs.version}";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ fliegendewurst ];
mainProgram = "openapi-down-convert";
};
})

View file

@ -5,16 +5,17 @@
installShellFiles, installShellFiles,
testers, testers,
oras, oras,
versionCheckHook,
}: }:
buildGoModule rec { buildGoModule (finalAttrs: {
pname = "oras"; pname = "oras";
version = "1.2.3"; version = "1.2.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "oras-project"; owner = "oras-project";
repo = "oras"; repo = "oras";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-IXIw2prApg5iL3BPbOY4x09KjyhFvKofgfz2L6UXKR8="; hash = "sha256-IXIw2prApg5iL3BPbOY4x09KjyhFvKofgfz2L6UXKR8=";
}; };
@ -27,7 +28,7 @@ buildGoModule rec {
ldflags = [ ldflags = [
"-s" "-s"
"-w" "-w"
"-X oras.land/oras/internal/version.Version=${version}" "-X oras.land/oras/internal/version.Version=${finalAttrs.version}"
"-X oras.land/oras/internal/version.BuildMetadata=" "-X oras.land/oras/internal/version.BuildMetadata="
"-X oras.land/oras/internal/version.GitTreeState=clean" "-X oras.land/oras/internal/version.GitTreeState=clean"
]; ];
@ -40,29 +41,18 @@ buildGoModule rec {
''; '';
doInstallCheck = true; doInstallCheck = true;
installCheckPhase = '' nativeInstallCheckInputs = [ versionCheckHook ];
runHook preInstallCheck versionCheckProgramArg = "version";
$out/bin/oras --help meta = {
$out/bin/oras version | grep "${version}"
runHook postInstallCheck
'';
passthru.tests.version = testers.testVersion {
package = oras;
command = "oras version";
};
meta = with lib; {
homepage = "https://oras.land/"; homepage = "https://oras.land/";
changelog = "https://github.com/oras-project/oras/releases/tag/v${version}"; changelog = "https://github.com/oras-project/oras/releases/tag/v${finalAttrs.version}";
description = "ORAS project provides a way to push and pull OCI Artifacts to and from OCI Registries"; description = "ORAS project provides a way to push and pull OCI Artifacts to and from OCI Registries";
mainProgram = "oras"; mainProgram = "oras";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = with maintainers; [ maintainers = with lib.maintainers; [
jk jk
developer-guy developer-guy
]; ];
}; };
} })

View file

@ -36,14 +36,14 @@
let let
pname = "pulsar"; pname = "pulsar";
version = "1.127.1"; version = "1.128.0";
sourcesPath = sourcesPath =
{ {
x86_64-linux.tarname = "Linux.${pname}-${version}.tar.gz"; x86_64-linux.tarname = "Linux.${pname}-${version}.tar.gz";
x86_64-linux.hash = "sha256-qcsnYrfrKD9QKcV2eEYVcHNKxpGUtC9G2D3G/ceuWCw="; x86_64-linux.hash = "sha256-LDr5H2VchlTzHtwcDo0za9GWfKZTpXx6LZVwtgKWxxY=";
aarch64-linux.tarname = "ARM.Linux.${pname}-${version}-arm64.tar.gz"; aarch64-linux.tarname = "ARM.Linux.${pname}-${version}-arm64.tar.gz";
aarch64-linux.hash = "sha256-V40O0M6H7sveuYpHB9vdatUR+r7q0YKTI4XcGOQXffo="; aarch64-linux.hash = "sha256-tT55J2TDRiEcsh5vNVl2dapRdYj3yZsn0ZrfjO5qnqE=";
} }
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");

View file

@ -0,0 +1,33 @@
https://github.com/scheme/scsh/pull/50.patch
From edced224436fa70cd7d885fe65996b9c3cfd33d7 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Mon, 28 Apr 2025 22:40:31 +0100
Subject: [PATCH] c/syscalls.c: add missing `<time.h>` icnlude
Without the change the build fails for me as:
c/syscalls.c: In function 'sleep_until':
c/syscalls.c:711:18: error: implicit declaration of function 'time' [-Wimplicit-function-declaration]
711 | time_t now = time(0);
| ^~~~
c/syscalls.c:41:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
40 | #include "syscalls.h"
+++ |+#include <time.h>
41 |
---
c/syscalls.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/c/syscalls.c b/c/syscalls.c
index fe11e81..2be25a8 100644
--- a/c/syscalls.c
+++ b/c/syscalls.c
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <time.h> /* for time() */
#include <sys/signal.h>
#include <signal.h>
#include <sys/types.h>

View file

@ -0,0 +1,31 @@
https://github.com/scheme/scsh/pull/51.patch
From b2934abb68d6adab448f24787192c047e46cf17c Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Mon, 28 Apr 2025 22:39:55 +0100
Subject: [PATCH] configure.ac: add detection of `pty.h`
Without the change the build on modern autoconf fails as:
c/tty.c: In function 'allocate_master':
c/tty.c:398:14: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration]
398 | rc = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
| ^~~~~~~
| openat
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 99779dc..1cd8b22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ CPPFLAGS="$CPPFLAGS -I$S48DIR/include"
# Checks for libraries.
# Checks for header files.
-AC_CHECK_HEADERS([fcntl.h limits.h netdb.h sgtty.h stdlib.h string.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utime.h])
+AC_CHECK_HEADERS([fcntl.h limits.h netdb.h pty.h sgtty.h stdlib.h string.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utime.h])
dnl We need the scheme48.h headers, so bomb out if we can't find them.
AC_CHECK_HEADERS([scheme48.h], [],

View file

@ -19,6 +19,15 @@ stdenv.mkDerivation {
fetchSubmodules = true; fetchSubmodules = true;
}; };
patches = [
# Fix the build against gcc-14:
# https://github.com/scheme/scsh/pull/50
./gcc-14-p1.patch
# Fix the build against gcc-14:
# https://github.com/scheme/scsh/pull/51
./gcc-14-p2.patch
];
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ scheme48 ]; buildInputs = [ scheme48 ];
configureFlags = [ "--with-scheme48=${scheme48}" ]; configureFlags = [ "--with-scheme48=${scheme48}" ];

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Temptin"; owner = "Temptin";
repo = "SkypeExport"; repo = "SkypeExport";
rev = "v${finalAttrs.version}"; tag = "v${finalAttrs.version}";
hash = "sha256-Uy3bmylDm/3T7T48zBkuk3lbnWW6Ps4Huqz8NjSAk8Y="; hash = "sha256-Uy3bmylDm/3T7T48zBkuk3lbnWW6Ps4Huqz8NjSAk8Y=";
}; };
@ -26,18 +26,27 @@ stdenv.mkDerivation (finalAttrs: {
}) })
]; ];
# fix build against Boost >= 1.85
# https://github.com/Temptin/SkypeExport/pull/24
postPatch = ''
substituteInPlace src/SkypeExport/main.cpp \
--replace-fail \
'.leaf()' \
'.filename()'
'';
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ boost ]; buildInputs = [ boost ];
preConfigure = "cd src/SkypeExport/_gccbuild/linux"; preConfigure = "cd src/SkypeExport/_gccbuild/linux";
installPhase = "install -Dt $out/bin SkypeExport"; installPhase = "install -Dt $out/bin SkypeExport";
meta = with lib; { meta = {
description = "Export Skype history to HTML"; description = "Export Skype history to HTML";
mainProgram = "SkypeExport"; mainProgram = "SkypeExport";
homepage = "https://github.com/Temptin/SkypeExport"; homepage = "https://github.com/Temptin/SkypeExport";
license = licenses.gpl2; license = lib.licenses.gpl2Only;
platforms = platforms.unix; platforms = lib.platforms.unix;
maintainers = [ ]; maintainers = [ ];
}; };
}) })

View file

@ -6,7 +6,6 @@
pkg-config, pkg-config,
lua, lua,
fpc, fpc,
pcre,
portaudio, portaudio,
freetype, freetype,
libpng, libpng,
@ -26,7 +25,6 @@
let let
sharedLibs = [ sharedLibs = [
pcre
portaudio portaudio
freetype freetype
SDL2 SDL2
@ -65,11 +63,6 @@ stdenv.mkDerivation rec {
libpng libpng
] ++ sharedLibs; ] ++ sharedLibs;
postPatch = ''
substituteInPlace src/config.inc.in \
--subst-var-by libpcre_LIBNAME libpcre.so.1
'';
preBuild = preBuild =
let let
items = lib.concatMapStringsSep " " (x: "-rpath ${lib.getLib x}/lib") sharedLibs; items = lib.concatMapStringsSep " " (x: "-rpath ${lib.getLib x}/lib") sharedLibs;

View file

@ -32,9 +32,12 @@ stdenv.mkDerivation (finalAttrs: {
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
nodejs
yarn yarn
]; ];
strictDeps = true;
dontConfigure = true; dontConfigure = true;
buildPhase = '' buildPhase = ''

View file

@ -12,13 +12,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ngtcp2"; pname = "ngtcp2";
version = "1.11.0"; version = "1.12.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ngtcp2"; owner = "ngtcp2";
repo = "ngtcp2"; repo = "ngtcp2";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-m9kJrEDYfxPSreH14M/h/f+7vgk6Ho6pmvVdJ1S8acc="; hash = "sha256-WAZKlIGwSn/U3MPF2RDOscZ5EVqQyViViy9beQeroNs=";
}; };
outputs = [ outputs = [

View file

@ -7,12 +7,12 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "lottie"; pname = "lottie";
version = "0.7.1"; version = "0.7.2";
pyproject = true; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-If05yOaLsfBDvVxmnDxgxwqc3lkCjTW8YV3e+S9CU2o="; hash = "sha256-hTBKwVLNBCyf6YpSe10TajHG/iqs2FnOHFgYm7lG0Sc=";
}; };
build-system = [ setuptools ]; build-system = [ setuptools ];

View file

@ -1,6 +1,7 @@
{ {
lib, lib,
buildPythonPackage, buildPythonPackage,
stdenv,
fetchPypi, fetchPypi,
# build-system # build-system
@ -78,7 +79,8 @@ buildPythonPackage rec {
_darwinAllowLocalNetworking = true; _darwinAllowLocalNetworking = true;
disabledTests = [ disabledTests =
[
# tests that require network access (like DNS lookups) # tests that require network access (like DNS lookups)
"test_truesendall_with_dump_from_recording" "test_truesendall_with_dump_from_recording"
"test_aiohttp" "test_aiohttp"
@ -86,6 +88,10 @@ buildPythonPackage rec {
"test_gethostbyname" "test_gethostbyname"
# httpx read failure # httpx read failure
"test_no_dangling_fds" "test_no_dangling_fds"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# fails on darwin due to upstream bug: https://github.com/mindflayer/python-mocket/issues/287
"test_httprettish_httpx_session"
]; ];
pythonImportsCheck = [ "mocket" ]; pythonImportsCheck = [ "mocket" ];

View file

@ -2,23 +2,29 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
pythonOlder,
python-can, # build system
setuptools,
# dependencies
numpy,
nunavut,
# optional dependencies
cobs, cobs,
libpcap, libpcap,
nunavut,
numpy,
pyserial, pyserial,
pytestCheckHook, python-can,
# tests
pytest-asyncio, pytest-asyncio,
pytestCheckHook,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pycyphal"; pname = "pycyphal";
version = "1.18.0"; version = "1.18.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "OpenCyphal"; owner = "OpenCyphal";
@ -28,7 +34,11 @@ buildPythonPackage rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
propagatedBuildInputs = [ build-system = [ setuptools ];
pythonRelaxDeps = [ "numpy" ];
dependencies = [
numpy numpy
nunavut nunavut
]; ];
@ -67,13 +77,17 @@ buildPythonPackage rec {
disabledTestPaths = [ disabledTestPaths = [
"pycyphal/application/__init__.py" "pycyphal/application/__init__.py"
"pycyphal/application/_transport_factory.py" "pycyphal/application/_transport_factory.py"
"pycyphal/transport/udp/_ip/_link_layer.py" "pycyphal/application/register/backend/dynamic.py"
"pycyphal/transport/udp/_ip/_v4.py" "pycyphal/application/register/backend/static.py"
"pycyphal/transport/udp"
"tests/application" "tests/application"
"tests/demo" "tests/demo"
"tests/dsdl" "tests/dsdl"
"tests/presentation" "tests/presentation"
"tests/transport" "tests/transport"
# These are flaky -- test against string representations of values
"pycyphal/application/register/_registry.py"
"pycyphal/application/register/_value.py"
]; ];
pythonImportsCheck = [ "pycyphal" ]; pythonImportsCheck = [ "pycyphal" ];

View file

@ -146,7 +146,7 @@ buildPythonPackage rec {
homepage = "https://github.com/pymupdf/PyMuPDF"; homepage = "https://github.com/pymupdf/PyMuPDF";
changelog = "https://github.com/pymupdf/PyMuPDF/releases/tag/${src.tag}"; changelog = "https://github.com/pymupdf/PyMuPDF/releases/tag/${src.tag}";
license = lib.licenses.agpl3Only; license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ teto ]; maintainers = [ ];
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
}; };
} }

View file

@ -173,7 +173,9 @@ buildPythonPackage rec {
disabledTests = [ disabledTests = [
# Tests are time-sensitive and power-consuming # Tests are time-sensitive and power-consuming
# Those tests fails repeatably and are flaky # Those tests fails repeatably and are flaky
"test_access_channels_by_name"
"test_access_channels_by_slice" "test_access_channels_by_slice"
"test_access_channels_by_tuple"
"test_aggregator" "test_aggregator"
"test_datasaver" "test_datasaver"
"test_do1d_additional_setpoints_shape" "test_do1d_additional_setpoints_shape"
@ -181,7 +183,9 @@ buildPythonPackage rec {
"test_field_limits" "test_field_limits"
"test_get_array_in_scalar_param_data" "test_get_array_in_scalar_param_data"
"test_get_parameter_data" "test_get_parameter_data"
"test_measured"
"test_ramp_safely" "test_ramp_safely"
"test_ramp_scaled"
# more flaky tests # more flaky tests
# https://github.com/microsoft/Qcodes/issues/5551 # https://github.com/microsoft/Qcodes/issues/5551

View file

@ -15,6 +15,7 @@
qtmultimedia, qtmultimedia,
qtsensors, qtsensors,
qttools, qttools,
extra-cmake-modules,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@ -26,6 +27,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-E3l+5l4rsauidl6Ik5gSWf+SGpVaAVi5X51etl1D05w="; hash = "sha256-E3l+5l4rsauidl6Ik5gSWf+SGpVaAVi5X51etl1D05w=";
}; };
# fix concatenation of absolute paths like
# /nix/store/77zcv3vmndif01d4wh1rh0d1dyvyqzpy-gcompris-25.0/bin/..//nix/store/77zcv3vmndif01d4wh1rh0d1dyvyqzpy-gcompris-25.0/share/gcompris-qt/rcc/core.rcc
postPatch = ''
substituteInPlace src/core/config.h.in --replace-fail \
"../@_data_dest_dir@" "../share/gcompris-qt"
'';
cmakeFlags = [ cmakeFlags = [
(lib.cmakeFeature "QML_BOX2D_LIBRARY" "${qmlbox2d}/${qtbase.qtQmlPrefix}/Box2D.2.1") (lib.cmakeFeature "QML_BOX2D_LIBRARY" "${qmlbox2d}/${qtbase.qtQmlPrefix}/Box2D.2.1")
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck) (lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
@ -33,6 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
extra-cmake-modules
gettext gettext
ninja ninja
qttools qttools

View file

@ -0,0 +1,25 @@
diff --git a/apps/openmw/mwstate/charactermanager.hpp b/apps/openmw/mwstate/charactermanager.hpp
index 2daf734..b77d2a8 100644
--- a/apps/openmw/mwstate/charactermanager.hpp
+++ b/apps/openmw/mwstate/charactermanager.hpp
@@ -1,6 +1,8 @@
#ifndef GAME_STATE_CHARACTERMANAGER_H
#define GAME_STATE_CHARACTERMANAGER_H
+#include <list>
+
#include <boost/filesystem/path.hpp>
#include "character.hpp"
diff --git a/components/vfs/filesystemarchive.cpp b/components/vfs/filesystemarchive.cpp
index 6eef4b9..608323e 100644
--- a/components/vfs/filesystemarchive.cpp
+++ b/components/vfs/filesystemarchive.cpp
@@ -1,5 +1,7 @@
#include "filesystemarchive.hpp"
+#include <algorithm>
+
#include <boost/filesystem.hpp>
#include <components/debug/debuglog.hpp>

View file

@ -114,6 +114,9 @@ let
# https://github.com/TES3MP/openmw-tes3mp/issues/552 # https://github.com/TES3MP/openmw-tes3mp/issues/552
./tes3mp.patch ./tes3mp.patch
# https://github.com/TES3MP/TES3MP/pull/691
./tes3mp-gcc14-fix.patch
]; ];
env.NIX_CFLAGS_COMPILE = "-fpermissive"; env.NIX_CFLAGS_COMPILE = "-fpermissive";

View file

@ -3,6 +3,7 @@
stdenv, stdenv,
fetchurl, fetchurl,
installShellFiles, installShellFiles,
writableTmpDirAsHomeHook,
}: }:
let let
arch = arch =
@ -29,50 +30,54 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "ibmcloud-cli"; pname = "ibmcloud-cli";
version = "2.30.0"; version = "2.34.0";
src = fetchurl { src = fetchurl {
url = "https://download.clis.cloud.ibm.com/ibm-cloud-cli/${finalAttrs.version}/binaries/IBM_Cloud_CLI_${finalAttrs.version}_${platform}.tgz"; url = "https://download.clis.cloud.ibm.com/ibm-cloud-cli/${finalAttrs.version}/binaries/IBM_Cloud_CLI_${finalAttrs.version}_${platform}.tgz";
sha256 = hash =
{ {
"x86_64-darwin" = "5d4d16f35c034aa336e28b5685684146ec5773a6d7f456ed0d0e5d686adf4b25"; "x86_64-darwin" = "sha256-6E+yUqpX8kp/T4jxAWwkBUsCQh31vwJGw3wnqkUs3Js=";
"aarch64-darwin" = "d563b8a4214da4360756bd18283b68c118139b5d3dd1b1d31c7ab7e61349e126"; "aarch64-darwin" = "sha256-CK0fUIYDVx25EzXGdhexaChVxkifSn6BKtZTQB5wl1o=";
"x86_64-linux" = "e6c874702851f16a3c21570020da85122a0ec0ca7e9dd75091684df1030d7295"; "x86_64-linux" = "sha256-xYuVEkgbVQNdR/v9C0Do9wMeOYlfntRJaen/XaHMJvQ=";
"aarch64-linux" = "6904c9de54845adcd08eb9906567493b68ad3f4cbba9d1121f63d9df2dd47185"; "aarch64-linux" = "sha256-MXr6NpO3XhrCbcss3Y+GzkbgQ07iOzmp99lAtfZ8YMk=";
"i686-linux" = "bc6be9a65a6942e158ab202a2d1c89c4294b5cebf60841f4ac1d21064052e7e7"; "i686-linux" = "sha256-1oL+jn3KTfIE+2oW4i8+RUr/c9/Ew/H7PToe/l19C5s=";
"powerpc64le-linux" = "271a0aa9c0a1dc2c84772fba33c9c6b97588d35eccf6757de6974c433b6e7874"; "powerpc64le-linux" = "sha256-hZADXpi9zxRB+wy4V4owQqmE3BYRSenNjlUfjWqBnow=";
"s390x-linux" = "e8ec8adaaae2eab091500c257c7b18acf5e9556b4910df8290600bd7f723fdc1"; "s390x-linux" = "sha256-ayQZD4+6U6WLfIhbVy/HCATjhZYybk3/83ak7BruWQ8=";
} }
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
}; };
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [
installShellFiles
writableTmpDirAsHomeHook
];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -D ibmcloud $out/bin/ibmcloud install -Dm755 ibmcloud $out/bin/ibmcloud
mkdir -p $out/share/ibmcloud mkdir -p $out/share/ibmcloud
cp LICENSE NOTICE $out/share/ibmcloud cp LICENSE NOTICE $out/share/ibmcloud
export HOME=$(mktemp -d)
installShellCompletion --cmd ibmcloud --bash <($out/bin/ibmcloud --generate-bash-completion) installShellCompletion --cmd ibmcloud --bash <($out/bin/ibmcloud --generate-bash-completion)
runHook postInstall runHook postInstall
''; '';
meta = with lib; { passthru.updateScript = ./update.sh;
meta = {
description = "Command line client for IBM Cloud"; description = "Command line client for IBM Cloud";
homepage = "https://cloud.ibm.com/docs/cli"; homepage = "https://cloud.ibm.com/docs/cli";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = with maintainers; [ emilytrau ]; maintainers = with lib.maintainers; [ emilytrau ];
platforms = [ platforms = [
"x86_64-linux" "x86_64-linux"
"aarch64-linux" "aarch64-linux"
"i686-linux" "i686-linux"
"powerpc64le-linux" "powerpc64le-linux"
"s390x-linux" "s390x-linux"
] ++ platforms.darwin; ] ++ lib.platforms.darwin;
sourceProvenance = with sourceTypes; [ binaryNativeCode ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
mainProgram = "ibmcloud"; mainProgram = "ibmcloud";
}; };
}) })

View file

@ -0,0 +1,29 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nix-update common-updater-scripts nix jq
set -euo pipefail
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; ibmcloud-cli.version or (lib.getVersion ibmcloud-cli)" | tr -d '"')
latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/IBM-Cloud/ibm-cloud-cli-release/releases/latest | jq --raw-output .tag_name | sed 's/^v//')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "package is up-to-date: $currentVersion"
exit 0
fi
update-source-version ibmcloud-cli $latestVersion || true
for system in \
x86_64-linux \
aarch64-linux \
i686-linux \
powerpc64le-linux \
s390x-linux \
x86_64-darwin \
aarch64-darwin; do
tmp=$(mktemp -d)
curl -fsSL -o $tmp/ibmcloud-cli $(nix-instantiate --eval -E "with import ./. {}; ibmcloud-cli.src.url" --system "$system" | tr -d '"')
hash=$(nix hash file $tmp/ibmcloud-cli)
update-source-version ibmcloud-cli $latestVersion $hash --system=$system --ignore-same-version
rm -rf $tmp
done

View file

@ -1,5 +1,7 @@
{ {
lib, lib,
buildPythonApplication,
fetchFromGitHub,
pkgconfig, pkgconfig,
wrapGAppsHook3, wrapGAppsHook3,
gettext, gettext,
@ -14,10 +16,9 @@
pydantic, pydantic,
pydbus, pydbus,
psutil, psutil,
fetchFromGitHub,
buildPythonApplication,
procps, procps,
gtksourceview4, gtksourceview4,
bash,
nixosTests, nixosTests,
# Change the default log level to debug for easier debugging of package issues # Change the default log level to debug for easier debugging of package issues
withDebugLogLevel ? false, withDebugLogLevel ? false,
@ -36,40 +37,84 @@ let
in in
(buildPythonApplication rec { (buildPythonApplication rec {
pname = "input-remapper"; pname = "input-remapper";
version = "2.0.1"; version = "2.1.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sezanzeb"; owner = "sezanzeb";
repo = "input-remapper"; repo = "input-remapper";
rev = version; tag = version;
hash = "sha256-rwlVGF/cWSv6Bsvhrs6nMDQ8avYT80aasrhWyQv55/A="; hash = "sha256-GMKcs2UK1yegGT/TBsLGgTBJROQ38M6WwnLbJIuAZwg=";
}; };
postPatch = postPatch =
'' ''
# fix FHS paths # fix FHS paths
substituteInPlace inputremapper/configs/data.py \ substituteInPlace inputremapper/configs/data.py \
--replace "/usr/share" "$out/usr/share" --replace-fail "/usr/share" "$out/usr/share"
'' ''
+ lib.optionalString withDebugLogLevel '' + lib.optionalString withDebugLogLevel ''
# if debugging # if debugging
substituteInPlace inputremapper/logger.py --replace "logger.setLevel(logging.INFO)" "logger.setLevel(logging.DEBUG)" substituteInPlace inputremapper/logger.py \
--replace-fail "logger.setLevel(logging.INFO)" "logger.setLevel(logging.DEBUG)"
''; '';
doCheck = withDoCheck; nativeBuildInputs = [
nativeCheckInputs = [ wrapGAppsHook3
gettext # needed to build translations
gtk3
glib
gobject-introspection
pygobject3
] ++ maybeXmodmap;
dependencies = [
setuptools # needs pkg_resources
pygobject3
evdev
pkgconfig
pydantic
pydbus
gtksourceview4
psutil psutil
]; ];
doCheck = withDoCheck;
nativeCheckInputs = [ psutil ];
pythonImportsCheck = [ pythonImportsCheck = [
"evdev" "evdev"
"inputremapper" "inputremapper"
]; ];
postInstall = ''
substituteInPlace data/99-input-remapper.rules \
--replace-fail 'RUN+="/bin/input-remapper-control' "RUN+=\"$out/bin/input-remapper-control"
substituteInPlace data/input-remapper.service \
--replace-fail "ExecStart=/usr/bin/input-remapper-service" "ExecStart=$out/bin/input-remapper-service"
substituteInPlace data/input-remapper-autoload.desktop \
--replace-fail "bash" "${lib.getExe bash}"
install -m644 -D -t $out/share/applications/ data/*.desktop
install -m644 -D -t $out/share/polkit-1/actions/ data/input-remapper.policy
install -m644 -D data/99-input-remapper.rules $out/etc/udev/rules.d/99-input-remapper.rules
install -m644 -D data/input-remapper.service $out/lib/systemd/system/input-remapper.service
install -m644 -D data/input-remapper.policy $out/share/polkit-1/actions/input-remapper.policy
install -m644 -D data/inputremapper.Control.conf $out/etc/dbus-1/system.d/inputremapper.Control.conf
install -m644 -D data/input-remapper.svg $out/share/icons/hicolor/scalable/apps/input-remapper.svg
install -m644 -D -t $out/usr/share/input-remapper/ data/*
# Only install input-remapper prefixed binaries, we don't care about deprecated key-mapper ones
install -m755 -D -t $out/bin/ bin/input-remapper*
'';
# Custom test script, can't use plain pytest / pytestCheckHook # Custom test script, can't use plain pytest / pytestCheckHook
# We only run tests in the unit folder, integration tests require UI # We only run tests in the unit folder, integration tests require UI
# To allow tests which access the system and session DBUS to run, we start a dbus session # To allow tests which access the system and session DBUS to run, we start a dbus session
# and bind it to both the system and session buses # and bind it to both the system and session buses
installCheckPhase = '' installCheckPhase = ''
runHook preInstallCheck
echo "<busconfig> echo "<busconfig>
<type>session</type> <type>session</type>
<listen>unix:tmpdir=$TMPDIR</listen> <listen>unix:tmpdir=$TMPDIR</listen>
@ -97,10 +142,13 @@ in
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/build/system_bus_socket \ DBUS_SYSTEM_BUS_ADDRESS=unix:path=/build/system_bus_socket \
${dbus}/bin/dbus-run-session --config-file dbus.cfg \ ${dbus}/bin/dbus-run-session --config-file dbus.cfg \
python tests/test.py --start-dir unit python tests/test.py --start-dir unit
runHook postInstallCheck
''; '';
# Nixpkgs 15.9.4.3. When using wrapGAppsHook3 with special derivers you can end up with double wrapped binaries. # Nixpkgs 15.9.4.3. When using wrapGAppsHook3 with special derivers you can end up with double wrapped binaries.
dontWrapGApps = true; dontWrapGApps = true;
preFixup = '' preFixup = ''
makeWrapperArgs+=( makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}" "''${gappsWrapperArgs[@]}"
@ -108,54 +156,14 @@ in
) )
''; '';
nativeBuildInputs = [
wrapGAppsHook3
gettext # needed to build translations
gtk3
glib
gobject-introspection
pygobject3
] ++ maybeXmodmap;
propagatedBuildInputs = [
setuptools # needs pkg_resources
pygobject3
evdev
pkgconfig
pydantic
pydbus
gtksourceview4
];
postInstall = ''
substituteInPlace data/99-input-remapper.rules \
--replace-fail 'RUN+="/bin/input-remapper-control' "RUN+=\"$out/bin/input-remapper-control"
substituteInPlace data/input-remapper.service \
--replace-fail 'ExecStart=/usr/bin/input-remapper-service' "ExecStart=$out/bin/input-remapper-service"
substituteInPlace data/input-remapper-*.desktop \
--replace-fail 'Icon=/usr/share/input-remapper/input-remapper.svg' 'Icon=input-remapper.svg'
install -m644 -D -t $out/share/applications/ data/*.desktop
install -m644 -D -t $out/share/polkit-1/actions/ data/input-remapper.policy
install -m644 -D data/99-input-remapper.rules $out/etc/udev/rules.d/99-input-remapper.rules
install -m644 -D data/input-remapper.service $out/lib/systemd/system/input-remapper.service
install -m644 -D data/input-remapper.policy $out/share/polkit-1/actions/input-remapper.policy
install -m644 -D data/inputremapper.Control.conf $out/etc/dbus-1/system.d/inputremapper.Control.conf
install -m644 -D data/input-remapper.svg $out/share/icons/hicolor/scalable/apps/input-remapper.svg
install -m644 -D -t $out/usr/share/input-remapper/ data/*
# Only install input-remapper prefixed binaries, we don't care about deprecated key-mapper ones
install -m755 -D -t $out/bin/ bin/input-remapper*
'';
passthru.tests = nixosTests.input-remapper; passthru.tests = nixosTests.input-remapper;
meta = with lib; { meta = {
description = "Easy to use tool to change the mapping of your input device buttons"; description = "Easy to use tool to change the mapping of your input device buttons";
homepage = "https://github.com/sezanzeb/input-remapper"; homepage = "https://github.com/sezanzeb/input-remapper";
license = licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
platforms = platforms.linux; platforms = lib.platforms.linux;
maintainers = with maintainers; [ LunNova ]; maintainers = with lib.maintainers; [ LunNova ];
mainProgram = "input-remapper-gtk"; mainProgram = "input-remapper-gtk";
}; };
}).overrideAttrs }).overrideAttrs

View file

@ -1351,10 +1351,6 @@ with pkgs;
git-stack = callPackage ../applications/version-management/git-stack { }; git-stack = callPackage ../applications/version-management/git-stack { };
git-up = callPackage ../applications/version-management/git-up {
pythonPackages = python3Packages;
};
gittyup = libsForQt5.callPackage ../applications/version-management/gittyup { }; gittyup = libsForQt5.callPackage ../applications/version-management/gittyup { };
lucky-commit = callPackage ../applications/version-management/lucky-commit { }; lucky-commit = callPackage ../applications/version-management/lucky-commit { };