Show details about outdated packages in your NixOS system.

Overview

nix-olde is a tool to show details about outdated packages in your NixOS system using https://repology.org/ database.

It can use both default <nixpkgs> or custom URL or path specified via --nixpkgs / -n parameter.

I usually use the tool to see what I could update in nixpkgs that my system currently uses.

Dependencies

At runtime nix-olde uses 2 external packages and expects them in PATH:

  • curl to fetch repology.org reports
  • nix to query locally installed and available packages

To build nix-olde you will need rustc and cargo. Cargo.tml contains more detailed description of dependencies.

Running it

There is no Cargo.lock package or uploaded crate just yet. I'm not sure if such a small tool warrants it. Thus you need to clone and build it using cargo build tool:

$ git clone https://github.com/trofi/nix-olde.git
$ cd nix-olde
$ cargo build

Now you should be ready to run it.

Diff against current system:

$ ./target/debug/nix-olde

Diff against latest staging:

$ ./target/debug/nix-olde -n https://github.com/NixOS/nixpkgs/archive/refs/heads/staging.tar.gz

Or against local checkout:

$ ./target/debug/nix-olde -n ./nixpkgs

I usually use small shell wrapper to build-and-run against local staging checkout:

$ ./mkrun.bash -n $(realpath ~/n)

Typical output

$ cargo build && target/debug/nix-olde
...
Fetching 'repology'
Fetching 'available'
Fetching 'installed'
'installed' done, took 6.10 s.
'available' done, took 12.22 s.
'repology' done, took 75.38 s.

repology a52dec "0.8.0" | nixpkgs {"0.7.4"} {"nixos.a52dec"}
repology alsa-lib "1.2.8" | nixpkgs {"1.2.7.2"} {"nixos.alsa-lib"}
repology alsa-ucm-conf "1.2.8" | nixpkgs {"1.2.7.1"} {"nixos.alsa-ucm-conf"}
repology appstream "0.15.6" | nixpkgs {"0.15.5"} {"nixos.appstream"}
repology atomicparsley "20221229" | nixpkgs {"20210715.151551.e7ad03a"} {"nixos.atomicparsley"}
repology audit "3.0.9" | nixpkgs {"2.8.5"} {"nixos.audit"}
repology autogen "5.19.96" | nixpkgs {"5.18.16"} {"nixos.autogen"}
...
repology xrandr "1.5.2" | nixpkgs {"1.5.1"} {"nixos.xorg.xrandr"}
repology xset "1.2.5" | nixpkgs {"1.2.4"} {"nixos.xorg.xset"}
repology xsetroot "1.1.3" | nixpkgs {"1.1.2"} {"nixos.xorg.xsetroot"}
repology xterm "378" | nixpkgs {"377"} {"nixos.xterm"}
repology xz "5.4.1" | nixpkgs {"5.4.0"} {"nixos.xz"}
repology zxing-cpp-nu-book "2.0.0" | nixpkgs {"1.4.0"} {"nixos.zxing-cpp"}

388 of 1518 (25.56%) installed packages are outdated according to https://repology.org.

Some installed packages are missing in available list: 68
  Add '--verbose' to get it's full list.

Other options

There are a few options:

$ ./mkrun.bash --help

A tool to show outdated packages in current system according to repology.org database

Usage: nix-olde [OPTIONS]

Options:
  -n, --nixpkgs <NIXPKGS>  Alternative path to <nixpkgs> location
  -v, --verbose            Enable extra verbosity to report unexpected events, fetch progress and so on
  -h, --help               Print help
  -V, --version            Print version

--nixpkgs / -n is most useful when you are looking for packages that were not yet updated in a particular development branch of nixpkgs repository (usually staging or master).

How nix-olde works

The theory is simple: fetch data from various data sources and join them together. Each data source returns a tuple of package name, package version and possibly a bit of metadata around it (name in other systems, possible status).

Currently used data sources are:

  • installed packages: uses nix-instantiate / nix show-derivation. Provides fields:
    • name (example: python3.10-networkx-2.8.6)
    • version (example: 2.8.6)
  • available packages: uses nix-env -qa --json tool, memory hungry. Provides fields:
    • [keyed from installed packages] name (example: python3.10-networkx-2.8.6)
    • attribute: nixpkgs attribute path (example: nixos.python310Packages.networkx)
    • pname: name with version component dropped (example: nixos.python310Packages.networkx)
    • version (example: 2.8.6)
  • https://repology.org/ json database: uses https://repology.org/api/v1/projects/ HTTP endpoint. Provides fields:
    • repo: package repository (example: "nix_unstable")
    • [keyed from available] name: with version component dropped (example: nixos.python310Packages.networkx).
    • version (example: 2.8.6)
    • status: package status in repository (examples: "newest", "outdared").

License

nix-olde is distributed under MIT license.

You might also like...
Keyhouse is a skeleton of general-purpose Key Management System written in Rust.

Keyhouse Keyhouse is a skeleton of general-purpose Key Management System. Keyhouse is not an off-the-shelf system, and it's not ready for production.

clockchain is a system for benchmarking smart contract execution times across blockchains.
clockchain is a system for benchmarking smart contract execution times across blockchains.

Clockchain Clockchain is a research tool for benchmarking smart contract execution times across blockchains using Arcesco-- a block-chain agnostic ins

clockchain is a system for benchmarking smart contract execution times across blockchains.
clockchain is a system for benchmarking smart contract execution times across blockchains.

Clockchain Clockchain is a research tool for benchmarking smart contract execution times across blockchains using Arcesco-- a block-chain agnostic ins

An encrypted multi client messaging system written in pure Rust

🚩 Preamble This is a pure Rust multi-client encrypted messaging system, also known as Edode's Secured Messaging System. It is an end-to-end(s) commun

Dione is an anonymize and encrypted messaging system build on top on a peer to peer layer.

Secure and Anonymous Messaging WARNING: Currently Dione is not ready to be used nor does it fulfill its goal of being an anonymous messenger. In order

Multi Party Key Management System (KMS) for Secp256k1 Elliptic curve based digital signatures.

Key Management System (KMS) for curve Secp256k1 Multi Party Key Management System (KMS) for Secp256k1 Elliptic curve based digital signatures. Introdu

Generates a unique hash/identifier for a system given a set of parameters.

uniqueid 🔍 Generates a unique hash/identifier for a system given a set of parameters. Example usage use uniqueid; pub fn main() { let data = vec

MimiRust - Hacking the Windows operating system to hand us the keys to the kingdom with Rust
MimiRust - Hacking the Windows operating system to hand us the keys to the kingdom with Rust

MimiRust - Hacking the Windows operating system to hand us the keys to the kingdom with Rust

A certificate verification library for rustls that uses the operating system's verifier

rustls-platform-verifier A Rust library to verify the validity of TLS certificates based on the operating system's certificate facilities. On operatin

Comments
  • Does not work well with custom options from flakes and overlays that don't evaluate but are unused

    Does not work well with custom options from flakes and overlays that don't evaluate but are unused

    $ RUST_BACKTRACE=1 ./target/release/nix-olde -n ~/src/nixpkgs
    Fetching 'installed' ...
    Fetching 'available' ...
    Fetching 'repology' ...
    ERROR: command ["nix-instantiate", "<nixpkgs/nixos>", "-A", "system", "-I", "nixpkgs=/home/sandro/src/nixpkgs"] failed with status: ExitStatus(unix_wait_status(256))
      stdout: ""
      stderr: "error: The option `nix.deleteChannels' d"
    thread '<unnamed>' panicked at 'assertion failed: cmd.status.success()', src/main.rs:27:5
    stack backtrace:
       0: rust_begin_unwind
       1: core::panicking::panic_fmt
       2: core::panicking::panic
       3: nix_olde::run_cmd
       4: nix_olde::get_local_installed_packages
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    ERROR: command ["nix-env", "-qa", "--json", "--arg", "config", "import <nixpkgs/pkgs/top-level/packages-config.nix>", "--option", "build-users-group", "\"\"", "-f", "/home/sandro/src/nixpkgs"] failed with status: ExitStatus(unix_wait_status(256))
      stdout: ""
      stderr: "error: attribute 'nextcloud26' missing\n\n"
    thread '<unnamed>' panicked at 'assertion failed: cmd.status.success()', src/main.rs:27:5
    stack backtrace:
       0: rust_begin_unwind
       1: core::panicking::panic_fmt
       2: core::panicking::panic
       3: nix_olde::run_cmd
       4: nix_olde::get_local_available_packages
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    ... 'repology' done.
    thread 'main' panicked at 'a scoped thread panicked', src/main.rs:262:8
    stack backtrace:
       0: rust_begin_unwind
       1: core::panicking::panic_fmt
       2: std::thread::scoped::scope
       3: nix_olde::main
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    

    nextcloud26 is an entry in my overlays that does not exist yet. It would be great if such entries could be skipped. nix.deleteChannels is an option that only exists in a flake input and then is added to the module list in the flake.nix. Can nix-instantiate be made aware of this?

    opened by SuperSandro2000 8
Owner
Sergei Trofimovich
Sergei Trofimovich
Run unpatched dynamic binaries on NixOS

nix-ld-rs Run unpatched dynamic binaries on NixOS. This is a rewrite of nix-ld in Rust, with extra functionalities. It's intended to be upstreamed at

Nix community projects 13 Jun 26, 2023
Collect libraries and packages about cryptography in Rust.

Awesome Cryptography Rust Collect libraries and packages about cryptography in Rust. Collection Library Symmetric Public-key / Asymmetric One-way Hash

Rust Cryptography Community 282 Dec 25, 2022
Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

BPNS 1 May 2, 2022
Most useful information about your system in a single command.

mymy Access the most common information about your system using a single command. Mymy is a command line tool that provides the most helpful informati

Théo Crevon 5 Apr 4, 2023
deductive verification of Rust code. (semi) automatically prove your code satisfies your specifications!

Le marteau-pilon, forges et aciéries de Saint-Chamond, Joseph-Fortuné LAYRAUD, 1889 About Creusot is a tool for deductive verification of Rust code. I

Xavier Denis 609 Dec 28, 2022
Employ your built-in wetware pattern recognition and signal processing facilities to understand your network traffic

Nethoscope Employ your built-in wetware pattern recognition and signal processing facilities to understand your network traffic. Check video on how it

Vesa Vilhonen 86 Dec 5, 2022
Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Koofr 12 Dec 30, 2022
a Solana program for granting friends permissions on your account without revealing your private key.

Delegatooooor Granting Permission: An account holder (the delegator) decides to grant permission to a delegate. They create and sign a transaction tha

0xGhostMac 3 Apr 3, 2024
Alternative Free Identity System

Alfis Alternative Free Identity System This project represents a minimal blockchain without cryptocurrency, capable of sustaining any number of domain

Revertron 207 Jan 5, 2023
A cryptographically verifiable code review system for the cargo (Rust) package manager.

A cryptographically verifiable code review system for the cargo (Rust) package manager.

crev - Code REView system 1.8k Jan 2, 2023