Git Product home page Git Product logo

cabal2nix's Introduction

The cabal2nix monorepo

Continous Integration

Components

cabal2nix

Tool that generates Nix build instructions from a Cabal file. Also contains hackage2nix, the tool that generates the haskellPackages set in nixpkgs.

distribution-nixpkgs

Utility library implementing nixpkgs-specific tasks and concepts: Looking up packages, meta sets, Nix-style integrity hashes etc.

language-nix

Simplistic library to parse and render a subset of the Nix language.

hackage-db

Library for working with the Hackage database created and updated using cabal update.

Development

At the top-level, a cabal.project and shell.nix are provided for working on all packages in the repository. You can use direnv and (optionally) lorri to make the environment available in your normal shell as well.

Maintenance

The monorepo has been assembled using josh. You can obtain it from nixpkgs using nix-shell -p josh. Below, some common tasks are documented.

Extracting the original git history

josh's history filtering capabilities are quite powerful, allowing us to extract the original git histories of the repositories that have been vendored in. For example, for distribution-nixpkgs:

$ josh-filter ':/distribution-nixpkgs'
$ git checkout FILTERED_HEAD
$ ls *.cabal
distribution-nixpkgs.cabal

The FILTERED_HEAD ref has the original HEAD of the distribution-nixpkgs HEAD when it was vendored as its ancestor and can thus be pushed to the original repository.

Vendoring components

This probably won't come up in the future, but the process that was used to vendor the additional libraries is documented here:

$ name=…
$ git fetch https://github.com/nixos/$name.git
$ josh-filter ":prefix=$name" FETCH_HEAD
$ git merge --allow-unrelated-histories FILTERED_HEAD -m "$name: subtree upstream repo"

Also refer to the relevant josh documentation.

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.