Giter Club home page Giter Club logo

capkgs's Introduction

Content Addressed Packages

A collection of content-addressed package closures.

Purpose

This project aims to speed up development environment setup, reduce disk and CPU usage, and provide a smoother onboarding experience.

That's achieved by evaluating and building, then converting them into their content-addressed form using nix store make-content-addressed.

In this process, Nix calculates the hashes of the final output, as opposed to the default where the hash is calculated based on the attributes of a derivation.

Once the final hash is known, no other user has to download the sources and run the evaluation steps anymore, and they can fully trust the cache if the hash matches.

In a sense, this does for Nix programs what Nix does for other programs.

Naturally, only packages that were actually built successfully are available in this fashion.

Usage

At the moment, this requires the experimental fetch-closure feature of Nix. You can enable it using the --extra-experimental-features flag, or in your configuration. Additionally, this flake will only work with the flakes feature, although you may fetch the packages.json from this repo and use the closure attribute to pass to fetchClosure with traditional Nix.

Packages are referenced by a <org>/<repo>/<version>/<name> schema.

{
  inputs.capkgs.url = "github:input-output-hk/capkgs";
  outputs = {capkgs, ...}: {
    packages.x86_64-linux.cardano-node =
     capkgs.packages.x86_64-linux.input-output-hk-cardano-node-8-2-0-pre-cardano-node-exe-cardano-node-8-2-0;
  };
}

Packages

The list of packages we provide lives in packages.json, only packages without the fail attribute are considered. We keep the information about failed packages around to avoid attempts of rebuilding them which would consume vast amounts of time.

This list is derived from the projects.json, where we declare which packages from which repository we would like to have.

Ideally a repository follows a sensible release process, and we can just use that as basis for our versioning, but when that is not the case, there are other strategies, based on tag patterns or bare branch names.

TODO

  • Provide more statically compiled musl packages and nuke their references to the Nix store to allow even smaller closures.
  • Make the update scripts generally useful as a tool for the community.
  • Improve naming of packages, although verbose, it still may have collisions.
  • Run periodically on Hydra to populate our cache.
  • Automatically update this repo.
  • Maybe an easier way to force rebuilding specific packages.
  • Record why a specific package is marked as failed, not just that it did.
  • validate projects.json syntax before starting

capkgs's People

Contributors

johnalotoski avatar manveru avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.