Coder Social home page Coder Social logo

iq-scm / nix-init Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nix-community/nix-init

0.0 0.0 0.0 485 KB

Generate Nix packages from URLs with hash prefetching, dependency inference, license detection, and more [maintainer=@figsoda]

Home Page: https://discourse.nixos.org/t/25035

License: Mozilla Public License 2.0

Shell 0.23% Rust 93.70% Nix 6.06%

nix-init's Introduction

nix-init

matrix release version deps license ci

Generate Nix packages from URLs

Note: It is likely that the generated package will not work without some tweaks, also remember to double check the license and description even if it does work

  • Hash prefetching powered by nurl with support for cargoHash and vendorHash
  • Dependency inference for Rust and Python projects
  • Interactive prompts with fuzzy tab completions
  • License detection

Installation

The latest release of nix-init is packaged in nixpkgs and kept up to date on the unstable branches

If you want to use a more recent snapshot of nix-init, it is also available as a flake. The following command is equivalent to running nix-init --help:

nix run github:nix-community/nix-init -- --help

or if you don't have flakes enabled:

nix run --extra-experimental-features "flakes nix-command" github:nix-community/nix-init -- --help

Usage

Usage: nix-init [OPTIONS] [OUTPUT]

Arguments:
  [OUTPUT]  The path or directory to output the generated file to

Options:
  -u, --url <URL>          Specify the URL
  -n, --nixpkgs <NIXPKGS>  Path to nixpkgs (in nix)
  -c, --config <CONFIG>    Specify the config file
  -h, --help               Print help
  -V, --version            Print version

Supported builders

  • stdenv.mkDerivation
  • buildRustPackage
  • buildPythonApplication and buildPythonPackage
  • buildGoModule

Supported fetchers

  • fetchCrate
  • fetchFromGitHub
  • fetchFromGitLab
  • fetchFromGitea
  • fetchPypi
  • All other fetchers supported by nurl are also supported, you just have to manually input the tag/revision of the package

Configuration

nix-init will try to find nix-init/config.toml under XDG configuration directories

# ~/.config/nix-init/config.toml

# maintainers that will get added to the package meta
maintainers = ["figsoda"]

# path to nixpkgs, equivalent to `--nixpkgs`
nixpkgs = "<nixpkgs>"

# access tokens to access private repositories and avoid rate limits
[access-tokens]
"github.com" = "ghp_blahblahblah..."
"gitlab.com".command = ["secret-tool", "or", "whatever", "you", "use"]
"gitlab.gnome.org".file = "/path/to/api/token"

Changelog

See CHANGELOG.md

nix-init's People

Contributors

dependabot[bot] avatar figsoda avatar ninja3047 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.