Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,42 @@ rec {
runtimeInputs = with pkgs; [ nix-update ];
text =
let
skipped-packages = [
"atomic-browser" # -> atomic-server
"atomic-cli" # -> atomic-server
"firefox-meta-press" # -> meta-press
"inventaire" # -> inventaire-client
"kbin" # -> kbin-backend
"kbin-frontend" # -> kbin-backend
"pretalxFull" # -> pretalx
# FIX: needs custom update script
"marginalia-search"
"peertube-plugin-livechat"
# FIX: dream2nix
"corestore"
"liberaforms"
# FIX: package scope
"bigbluebutton"
"heads"
# FIX: don't update `sparql-queries` if there is no version change
"inventaire-client"
# fetcher not supported
"libervia-backend"
"libervia-desktop-kivy"
"libervia-media"
"libervia-templates"
"sat-tmp"
"urwid-satext"
# broken package
"libresoc-nmigen"
"libresoc-verilog"
];
update-packages = with lib; filter (x: !elem x skipped-packages) (attrNames ngipkgs);
Comment thread
eljamm marked this conversation as resolved.
update-commands = lib.concatMapStringsSep "\n" (package: ''
if ! nix-update --flake --use-update-script "${package}" "$@"; then
echo "${package}" >> "$TMPDIR/failed_updates.txt"
fi
'') (lib.attrNames ngipkgs);
'') update-packages;
in
# bash
''
Expand Down
19 changes: 10 additions & 9 deletions pkgs/by-name/inventaire-client/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ let
'';
};
in
buildNpmPackage rec {
buildNpmPackage (finalAttrs: {
pname = "inventaire-client";
version = "4.0.1";

src = fetchFromGitea {
domain = "codeberg.org";
owner = "inventaire";
repo = "inventaire-client";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-5v6JNqinlaiyDFidn6j7zaXdIoCaf8L6qHoa6qhC5Uk=";
};

Expand Down Expand Up @@ -109,7 +109,9 @@ buildNpmPackage rec {
--replace-fail './scripts/build_i18n' '${lib.getExe copyI18nDataScript}' \
--replace-fail 'webpack --config ./bundle/webpack.config.prod.cjs --progress' 'webpack --config ./bundle/webpack.config.prod.cjs' \
--replace-fail 'date -Ins' 'date -d "@$SOURCE_DATE_EPOCH" -Ins' \
--replace-fail '$(git rev-parse --short HEAD)' '"${if src.tag != null then src.tag else src.rev}"'
--replace-fail '$(git rev-parse --short HEAD)' '"${
with finalAttrs; if src.tag != null then src.tag else src.rev
}"'
'';

# "Your cache folder contains root-owned files" error from NPM
Expand All @@ -129,9 +131,7 @@ buildNpmPackage rec {
'';

passthru = rec {
updateSourceScript = gitUpdater {
rev-prefix = "v";
};
updateSourceScript = gitUpdater { rev-prefix = "v"; };
updateQueriesScript = writeShellApplication {
name = "inventaire-client-sparql-queries-update-script";
runtimeInputs = [
Expand All @@ -145,17 +145,18 @@ buildNpmPackage rec {
};
text = lib.strings.readFile ./update-sparql-queries.sh;
};
# FIX: don't update `sparql-queries` if there is no version change
updateScript = _experimental-update-script-combinators.sequence [
updateSourceScript.command
updateQueriesScript
(lib.getExe updateQueriesScript)
];
};

meta = {
description = "A libre collaborative resources mapper powered by open-knowledge (client-side)";
homepage = "https://inventaire.io";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.all;
teams = with lib.teams; [ ngi ];
};
}
})
47 changes: 8 additions & 39 deletions pkgs/by-name/inventaire-i18n/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@
lib,
buildNpmPackage,
fetchFromGitea,
unstableGitUpdater,
writeShellApplication,
_experimental-update-script-combinators,
nix,
sd,
nix-update-script,
}:

buildNpmPackage rec {
buildNpmPackage (finalAttrs: {
pname = "inventaire-i18n";
version = "0-unstable-2025-10-07";
version = "0-unstable-2025-10-20";

src = fetchFromGitea {
domain = "codeberg.org";
owner = "inventaire";
repo = "inventaire-i18n";
rev = "21121fab751ac85bd4d4f609b727685830560137";
hash = "sha256-YcVWayPIdaLFHmCnE5lECS15epIUNrDip/baPCwyvjE=";
rev = "ff65e4b40549955decdcc5c6913daa1672242901";
hash = "sha256-N9/zIul/rzd/vvTJmN1cXIXM9cgvDKlishmw0kH+z34=";
};

npmDepsHash = "sha256-hJ9L9X53n44Iz0lKX2NspMLtQbQA0nRgJvYZc5+xNuA=";
Expand All @@ -27,40 +23,13 @@ buildNpmPackage rec {
patchShebangs scripts
'';

passthru = {
updateScriptSrc = unstableGitUpdater { };
updateScriptNpmDeps = writeShellApplication {
name = "update-inventaire-i18n-npmDepsHash";
runtimeInputs = [
nix
sd
];
text = ''
export UPDATE_NIX_ATTR_PATH="''${UPDATE_NIX_ATTR_PATH:-inventaire-i18n}"

oldhash="$(nix-instantiate . --eval --strict -A ngipkgs."$UPDATE_NIX_ATTR_PATH".npmDepsHash | cut -d'"' -f2)"
newhash="$(nix-build -A ngipkgs."$UPDATE_NIX_ATTR_PATH".npmDeps --no-out-link 2>&1 | tail -n3 | grep 'got:' | cut -d: -f2- | xargs echo || true)"

if [ "$newhash" == "" ]; then
echo "No new npmDepsHash."
exit 0
fi

fname="$(nix-instantiate --eval -E "with import ./. {}; (builtins.unsafeGetAttrPos \"version\" ngipkgs.$UPDATE_NIX_ATTR_PATH).file" | cut -d'"' -f2)"
${sd.meta.mainProgram} --string-mode "$oldhash" "$newhash" "$fname"
'';
};
updateScript = _experimental-update-script-combinators.sequence [
passthru.updateScriptSrc
(lib.getExe passthru.updateScriptNpmDeps)
];
};
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

meta = {
description = "Repository hosting inventaire i18n strings and scripts";
homepage = "https://codeberg.org/inventaire/inventaire-i18n";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ ];
teams = with lib.teams; [ ngi ];
};
}
})
18 changes: 13 additions & 5 deletions pkgs/by-name/kazarma/package.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
lib,
beamPackages,
beam27Packages,
buildNpmPackage,
cacert,
fetchFromGitHub,
fetchFromGitLab,
nodejs,
_experimental-update-script-combinators,
unstableGitUpdater,
nix-update-script,
}:
let
beamPackages = beam27Packages;

# https://github.com/elixir-lang/elixir/issues/13976
beamPackages' = beamPackages.extend (self: super: { elixir = self.elixir_1_17; });

Expand Down Expand Up @@ -77,16 +82,19 @@ beamPackages'.mixRelease {
mix do deps.loadpaths --no-deps-check, phx.digest
'';

# Can't update from GitLab with fetchSubmodules
# https://github.com/Mic92/nix-update/issues/281
passthru.updateScript = _experimental-update-script-combinators.sequence [
(unstableGitUpdater { tagPrefix = "v"; }) # update version + source
(nix-update-script { extraArgs = [ "--version=skip" ]; }) # update deps
];

meta = {
description = "Matrix bridge to ActivityPub";
homepage = "https://kazar.ma/";
downloadPage = "https://gitlab.com/technostructures/kazarma/kazarma";
license = lib.licenses.agpl3Only;
teams = [ lib.teams.ngi ];
mainProgram = "kazarma";
# elixir 1.17 requires erlang >= 25 and <= 27
# even when that's true, cldr compilation still fails
# https://github.com/ngi-nix/ngipkgs/issues/1096
broken = true;
};
}
3 changes: 3 additions & 0 deletions pkgs/by-name/proximity-matcher/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
fetchFromGitHub,
python3Packages,
nix-update-script,
}:

let
Expand Down Expand Up @@ -74,6 +75,8 @@ python3Packages.buildPythonPackage {
"proximity_matcher_webservice"
];

passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

meta = {
description = "Webservice for proximity matching based on TLSH and vantage point trees";
homepage = "https://github.com/armijnhemel/proximity_matcher_webservice";
Expand Down
8 changes: 5 additions & 3 deletions pkgs/by-name/reoxide-plugin-simple/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
clang,
ninja,
reoxide,

nix-update-script,
}:

clangStdenv.mkDerivation (finalAttrs: {
pname = "reoxide-plugin-simple";
version = "0-unstable-2025-09-12";
version = "0-unstable-2025-09-04";

# use latest dev branch commit
src = fetchFromGitea {
Expand All @@ -37,20 +39,20 @@ clangStdenv.mkDerivation (finalAttrs: {
mesonBuildType = "release";

preConfigure = ''

mkdir -p .config/reoxide
touch .config/reoxide/reoxide.toml
export HOME=$PWD

meson setup --buildtype=release build

'';

postInstall = ''
mkdir -p $out/lib
cp simple/libsimple.so $out/lib/
'';

passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

meta = {
description = "Simple plugin template for reoxide";
homepage = "https://codeberg.org/ReOxide/reoxide";
Expand Down
45 changes: 12 additions & 33 deletions pkgs/by-name/taldir/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
fetchgit,
recutils,
buildGoModule,
gitUpdater,
writeShellApplication,
nix,
_experimental-update-script-combinators,
unstableGitUpdater,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "taldir";
version = "1.0.5";
version = "1.0.5-unstable-2025-10-15";

src = fetchgit {
url = "https://git.taler.net/taldir.git";
tag = "v${finalAttrs.version}";
hash = "sha256-ZKNkMV0IV6E+yCQeabGXpIQclx1S4YEgFn4whGXTaks=";
rev = "8fbc813afb14807dbc62c4c95402f282a8165f07";
hash = "sha256-2tIS98MTPGTEYym7L9ch+tWdDJBvKVQwpfAkxZiJaSc=";
};

vendorHash = "sha256-QCwakJTpRP7VT69EzQeInCCGBuNu3WsNCytnQcBdKQw=";
vendorHash = "sha256-G8eujeYLSlQ95hNLspAlWSj7MSB/eyg4iD2pp3kSupQ=";

nativeBuildInputs = [
recutils
Expand All @@ -43,32 +42,12 @@ buildGoModule (finalAttrs: {
# dial error (dial tcp [::1]:5432: connect: connection refused)
doCheck = false;

passthru = {
updateScriptSrc = gitUpdater { rev-prefix = "v"; };
updateScriptVendor = writeShellApplication {
name = "update-taldir-vendorHash";
runtimeInputs = [ nix ];
text = ''
export UPDATE_NIX_ATTR_PATH="''${UPDATE_NIX_ATTR_PATH:-taldir}"

oldhash="$(nix-instantiate . --eval --strict -A "$UPDATE_NIX_ATTR_PATH.goModules.drvAttrs.outputHash" | cut -d'"' -f2)"
newhash="$(nix-build -A "$UPDATE_NIX_ATTR_PATH.goModules" --no-out-link 2>&1 | tail -n3 | grep 'got:' | cut -d: -f2- | xargs echo || true)"

if [ "$newhash" == "" ]; then
echo "No new vendorHash."
exit 0
fi

fname="$(nix-instantiate --eval -E "with import ./. {}; (builtins.unsafeGetAttrPos \"version\" $UPDATE_NIX_ATTR_PATH).file" | cut -d'"' -f2)"

sed -i "s/$oldhash/$newhash/" "$fname"
'';
};
updateScript = _experimental-update-script-combinators.sequence [
finalAttrs.passthru.updateScriptSrc.command
(lib.getExe finalAttrs.passthru.updateScriptVendor)
];
};
# Currently, `nix-update-script` can only get latest version from:
# codeberg/crates.io/gitea/github/gitlab/pypi/savannah/sourcehut/rubygems/npm
passthru.updateScript = _experimental-update-script-combinators.sequence [
(unstableGitUpdater { tagPrefix = "v"; }) # update version + source
(nix-update-script { extraArgs = [ "--version=skip" ]; }) # update deps
];

meta = {
homepage = "https://git.taler.net/taldir.git";
Expand Down
21 changes: 6 additions & 15 deletions pkgs/by-name/taler-mdb/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,20 @@
taler-exchange,
taler-merchant,
qrencode,
gitUpdater,
}:

let
docs = fetchgit {
url = "https://git.taler.net/taler-docs.git";
rev = "b97d82f99dc32b0fdb7942dbb501603a2c86f8b1";
hash = "sha256-qyp/iHHGxE0A2UCSY+muyzUd0upuJeQK1OIaacsmrjs=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "taler-mdb";
version = "0.14.1";
version = "1.0.0";

src = fetchgit {
url = "https://git.taler.net/taler-mdb.git";
rev = "v${finalAttrs.version}";
# fatal: repository 'https://git.taler.net/docs.git/' not found
fetchSubmodules = false;
hash = "sha256-+raX3O2RNaMsN7Wi6F0P/lccpLOtL13EU4Fpe9lCueA=";
hash = "sha256-AAFnF8bN2Pnhy8OZbgA6CRHBIC6iP785HpVjPEVu+IQ=";
fetchSubmodules = true;
};

postPatch = ''
cp -R ${docs}/* doc/prebuilt/
'';

nativeBuildInputs = [
autoreconfHook
pkg-config
Expand All @@ -59,6 +48,8 @@ stdenv.mkDerivation (finalAttrs: {

doInstallCheck = true;

passthru.updateScript = gitUpdater { rev-prefix = "v"; };

meta = {
homepage = "https://git.taler.net/taler-mdb.git";
description = "Sales integration with the Multi-Drop-Bus of Snack machines, NFC readers and QR code display.";
Expand Down
File renamed without changes.
Loading