Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
23b6ed6
feat: add update.sh script to besu
aldoborrero Feb 13, 2024
7fffe04
feat: add update.sh script to teku
aldoborrero Feb 13, 2024
ab56b3b
feat: add support to nix-update-script to all go binaries
aldoborrero Feb 13, 2024
1d256c8
feat: add initial mantainers/script/update.py
aldoborrero Feb 13, 2024
bf33c6a
fix: ethereal don't need bls mcl libs
aldoborrero Feb 13, 2024
04338e3
fix: add $PRJ_ROOT to besu update script
aldoborrero Feb 13, 2024
a3f5479
fix: add $PRJ_ROOT to teku update script
aldoborrero Feb 13, 2024
a68cd02
fix: rename heimdall to heimdall-rs to avoid conflicts with nixpkgs
aldoborrero Feb 13, 2024
86373a1
fix: add i686-linux system for now for update.sh
aldoborrero Feb 13, 2024
069f201
feat: introduction of update.sh script
aldoborrero Feb 13, 2024
20128a0
feat: incorporate update.nix and update.py logic with improved semantics
aldoborrero Feb 14, 2024
29bfae5
fix: solve supportedFeatures not found in update.py
aldoborrero Feb 14, 2024
fd25852
fix: pass arguments as argstr instead
aldoborrero Feb 14, 2024
62dec41
fix: pass to nix-update-script extraArgs with flake support
aldoborrero Feb 14, 2024
cfdbace
feat: rework update.py script to use click and logging libraries
aldoborrero Feb 16, 2024
c53bb8f
feat: add black to treefmt
aldoborrero Feb 16, 2024
9a9dd23
chore: fmt
aldoborrero Feb 16, 2024
55111d1
fix: obtain package version in update.py
aldoborrero Feb 16, 2024
66c420d
feat: update besu/teku update.sh scripts
aldoborrero Feb 16, 2024
1fb43dc
chore: remove per attr path log
aldoborrero Feb 19, 2024
1a4ff9a
chore: update .envrc
selfuryon Oct 30, 2024
e6566e5
fix: heimdall -> heimdall-rs
selfuryon Oct 30, 2024
db0964e
chore: temporary disable update for some packages
selfuryon Oct 30, 2024
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
5 changes: 1 addition & 4 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
fi
nix_direnv_watch_file ./flake-shell.nix
watch_file ./flake-shell.nix
use flake
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
./modules
./pkgs
];
systems = import systems;
systems = (import systems) ++ ["i686-linux"];
perSystem = {
config,
pkgs,
Expand Down Expand Up @@ -131,6 +131,7 @@
flakeCheck = true;
programs = {
alejandra.enable = true;
black.enable = true;
deadnix.enable = true;
deno.enable = true;
mdformat.enable = true;
Expand Down
65 changes: 65 additions & 0 deletions maintainers/scripts/update/update.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
flakePath ? ./.,
system ? "x86_64-linux",
input ? "nixpkgs",
max-workers ? null,
keep-going ? null,
commit ? null,
no-confirm ? null,
}: let
flake = builtins.getFlake (builtins.toString flakePath);

pkgs = flake.inputs.${input}.legacyPackages.${system};
inherit (pkgs) lib;

filterPkgsWithUpdateScript = pkgs:
lib.filterAttrs (
_name: pkg:
lib.isDerivation pkg && lib.hasAttrByPath ["passthru" "updateScript"] pkg
)
pkgs;

flakePkgs = flake.packages.${system};

filteredPackages = filterPkgsWithUpdateScript flakePkgs;

packageData = name: package: {
inherit name;
pname = lib.getName package;
oldVersion = lib.getVersion package;
inherit (package.passthru) updateScript;
attrPath = name;
};

packagesJson = pkgs.writeText "packages.json" (builtins.toJSON (lib.mapAttrsToList packageData filteredPackages));

optionalArgs =
lib.optional (max-workers != null) "--max-workers=${toString max-workers}"
++ lib.optional (keep-going == "true") "--keep-going"
++ lib.optional (no-confirm == "true") "--no-confirm"
++ lib.optional (commit == "true") "--commit";

args = [packagesJson] ++ optionalArgs;

python = pkgs.python311.withPackages (ps:
with ps; [
click
]);
in
pkgs.stdenv.mkDerivation {
name = "flake-packages-update-script";
buildCommand = ''
echo ""
echo "----------------------------------------------------------------"
echo ""
echo "Not possible to update packages using \`nix-build\`"
echo "Please use \`nix-shell\` with this derivation."
echo ""
echo "----------------------------------------------------------------"
exit 1
'';
shellHook = ''
unset shellHook # Prevent contamination in nested shells.
exec ${python}/bin/python ${./update.py} ${builtins.concatStringsSep " " args}
'';
}
Loading