Skip to content

Make nixpkgs updatable by CI and upgrade nixpkgs in all RV repositories #13

Open
@juliankuners

Description

@juliankuners

This repository provides a nix flake with a nixpkgs flake input that is followed by most other runtime verification repositories that make use of nix. Pinning nixpkgs in all tools, libraries, and frameworks by runtime verification has the benefit that only one copy of nixpkgs is required to build the tools. Otherwise, multiple copies would be required, which includes builds of transitive runtime and build dependencies. This would significantly increase build size and maybe build time, especially the more different nixpkgs copies are used.

The nixpkgs input is pinned to the revision 69493a13eaea0dc4682fd07e8a084f17813dbeeb, which is from 14th May 2024 and therefore already more than 1 year behind the unstable branch of nixpkgs. This is causing issues in other repositories such as haskell-backend, where we want to use a newer version of the haskell compiler or with uv2nix in kontrol, where uv2nix uses functions/derivations in nixpkgs.lib that are not available in the stale revision that we pin.

Currently, there is no mechanism to automatically update nixpkgs in rv-nix-tools. Also, rv-nix-tools is not pinned in the flake files of other runtime verification repositories, see e.g. haskell-backend. This means that currently nixpkgs would get updated everywhere when nix flake update is run by workflows on any update pull requests. In addition, nixpkgs is enforced onto dependent repository from top to bottom. E.g., k makes nixpkgs use the same revision as llvm-backend.

By convention, the revision of nixpkgs to use in a flake and its dependencies is enforced by the respective flake in a bottom-up approach. This makes usage and maintenance of nixpkgs revisions, dependency breakage due to nixpkgs, and usage of these dependencies more intuitive for nix end-users. E.g., consider a scenario where a user defined kontrol as a flake input in a project. In order to pin the revision of nixpkgs to use in the project, by kontrol, and the dependencies of kontrol to the same version, the multiple more lines of overriding are required in a top-down approach in contrast to a single line in case of the bottom-up approach. In addition, these multiple lines require internal implementation details of the flakes.

This issue collectively tracks all pull requests required for the nixpkgs migration to upstream unstable that includes mechanisms to automatically update nixpkgs in the future periodically by CI. In addition, the structure of nixpkgs input enforcement will be refactored in all runtime verification repositories that make use of rv-nix-tools. Finally, devops workflows will be configured and updated to create dedicated update pull requests for rv-nix-tools, which implicitly updates nixpkgs.

Tasks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions